@@ -172,10 +181,9 @@ The following example demonstrates:
+ ng:disabled="{{isCancelDisabled()}}">Cancel
+ ng:disabled="{{isSaveDisabled()}}">Save
@@ -278,9 +286,9 @@ This example shows how to implement a custom HTML editor widget in Angular.
this.htmlContent = 'HelloWorld!';
}
- function HTMLEditorWidget(element) {
+ HTMLEditorWidget.$inject = ['$element', 'html$Filter'];
+ function HTMLEditorWidget(element, htmlFilter) {
var self = this;
- var htmlFilter = angular.filter('html');
this.$parseModel = function() {
// need to protect for script injection
@@ -309,7 +317,7 @@ This example shows how to implement a custom HTML editor widget in Angular.
}
angular.directive('ng:html-editor-model', function() {
- function linkFn($formFactory, element) {
+ return ['$formFactory', '$element', function ($formFactory, element) {
var exp = element.attr('ng:html-editor-model'),
form = $formFactory.forElement(element),
widget;
@@ -318,15 +326,13 @@ This example shows how to implement a custom HTML editor widget in Angular.
scope: this,
model: exp,
controller: HTMLEditorWidget,
- controllerArgs: [element]});
+ controllerArgs: {$element: element}});
// if the element is destroyed, then we need to
// notify the form.
element.bind('$destroy', function() {
widget.$destroy();
});
- }
- linkFn.$inject = ['$formFactory'];
- return linkFn;
+ }];
});