aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2011-12-06 12:20:35 -0800
committerIgor Minar2011-12-07 13:07:19 -0800
commitc28662d28dec613876bebacb2df994722c09f3fb (patch)
treec8b75bac0926f83579f27a0a0a9ecf771f9305dd
parentb97c6e5f7431e5aaf3a37fb70c6fb984166ff276 (diff)
downloadangular.js-c28662d28dec613876bebacb2df994722c09f3fb.tar.bz2
fix(filter): remove the $ prefix from filter service ids
-rw-r--r--docs/content/guide/dev_guide.forms.ngdoc2
-rw-r--r--src/service/filter.js10
-rw-r--r--src/service/formFactory.js2
-rw-r--r--test/service/parseSpec.js2
4 files changed, 8 insertions, 8 deletions
diff --git a/docs/content/guide/dev_guide.forms.ngdoc b/docs/content/guide/dev_guide.forms.ngdoc
index d2b81dcc..db2f88cd 100644
--- a/docs/content/guide/dev_guide.forms.ngdoc
+++ b/docs/content/guide/dev_guide.forms.ngdoc
@@ -286,7 +286,7 @@ This example shows how to implement a custom HTML editor widget in Angular.
this.htmlContent = '<b>Hello</b> <i>World</i>!';
}
- HTMLEditorWidget.$inject = ['$element', 'html$Filter'];
+ HTMLEditorWidget.$inject = ['$element', 'htmlFilter'];
function HTMLEditorWidget(element, htmlFilter) {
var self = this;
diff --git a/src/service/filter.js b/src/service/filter.js
index dd97851b..2947d84b 100644
--- a/src/service/filter.js
+++ b/src/service/filter.js
@@ -30,7 +30,7 @@
* }
* </pre>
*
- * The filter function is registered with the `$injector` under the filter name suffixe with `$Filter`.
+ * The filter function is registered with the `$injector` under the filter name suffixe with `Filter`.
* <pre>
* it('should be the same instance', inject(
* function($filterProvider) {
@@ -38,8 +38,8 @@
* return ...;
* });
* },
- * function($filter, revers$Filter) {
- * expect($filter('reverse')).toBe(reverse$Filter);
+ * function($filter, reverseFilter) {
+ * expect($filter('reverse')).toBe(reverseFilter);
* });
* </pre>
*
@@ -76,11 +76,11 @@
*/
$FilterProvider.$inject = ['$provide'];
function $FilterProvider($provide) {
- var suffix = '$Filter';
+ var suffix = 'Filter';
function register(name, factory) {
return $provide.factory(name + suffix, factory);
- };
+ }
this.register = register;
this.$get = ['$injector', function($injector) {
diff --git a/src/service/formFactory.js b/src/service/formFactory.js
index eb33eb4a..15a4733f 100644
--- a/src/service/formFactory.js
+++ b/src/service/formFactory.js
@@ -29,7 +29,7 @@
this.html = '<b>Hello</b> <i>World</i>!';
}
- HTMLEditorWidget.$inject = ['$element', 'html$Filter'];
+ HTMLEditorWidget.$inject = ['$element', 'htmlFilter'];
function HTMLEditorWidget(element, htmlFilter) {
var self = this;
diff --git a/test/service/parseSpec.js b/test/service/parseSpec.js
index 85dab72c..f57a52c7 100644
--- a/test/service/parseSpec.js
+++ b/test/service/parseSpec.js
@@ -198,7 +198,7 @@ describe('parser', function() {
expect(function() {
scope.$eval("1|nonexistent");
- }).toThrow(new Error("Unknown provider for 'nonexistent$Filter'."));
+ }).toThrow(new Error("Unknown provider for 'nonexistentFilter'."));
scope.offset = 3;
expect(scope.$eval("'abcd'|substring:1:offset")).toEqual("bc");