aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/formFactory.js
diff options
context:
space:
mode:
authorMisko Hevery2011-11-08 17:40:52 -0800
committerMisko Hevery2011-11-14 20:31:15 -0800
commit9c0639437607a4fcea379bbaf610600d05d8a9b7 (patch)
tree1ae90d93d0139f7791487fe814360904254d39cb /src/service/formFactory.js
parent085e3c611fd0cd48757702c50c67b551a00a0d38 (diff)
downloadangular.js-9c0639437607a4fcea379bbaf610600d05d8a9b7.tar.bz2
chore(scenario tests): make scenario tests pass again
Diffstat (limited to 'src/service/formFactory.js')
-rw-r--r--src/service/formFactory.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/service/formFactory.js b/src/service/formFactory.js
index 972b46ee..8ba8ce79 100644
--- a/src/service/formFactory.js
+++ b/src/service/formFactory.js
@@ -29,9 +29,9 @@
this.html = '<b>Hello</b> <i>World</i>!';
}
- 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
@@ -59,7 +59,7 @@
}
angular.directive('ng:contenteditable', function() {
- function linkFn($formFactory, element) {
+ return ['$formFactory', '$element', function ($formFactory, element) {
var exp = element.attr('ng:contenteditable'),
form = $formFactory.forElement(element),
widget;
@@ -68,14 +68,12 @@
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;
+ }];
});
</script>
<form name='editorForm' ng:controller="EditorCntl">