|
20 | 20 | * Dependency Injected. To achieve this a filter definition consists of a factory function which is
|
21 | 21 | * annotated with dependencies and is responsible for creating a filter function.
|
22 | 22 | *
|
| 23 | + * <div class="alert alert-warning"> |
| 24 | + * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. |
| 25 | + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace |
| 26 | + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores |
| 27 | + * (`myapp_subsection_filterx`). |
| 28 | + * </div> |
| 29 | + * |
23 | 30 | * ```js
|
24 | 31 | * // Filter registration
|
25 | 32 | * function MyModule($provide, $filterProvider) {
|
@@ -101,6 +108,13 @@ function $FilterProvider($provide) {
|
101 | 108 | * @name $filterProvider#register
|
102 | 109 | * @param {string|Object} name Name of the filter function, or an object map of filters where
|
103 | 110 | * the keys are the filter names and the values are the filter factories.
|
| 111 | + * |
| 112 | + * <div class="alert alert-warning"> |
| 113 | + * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. |
| 114 | + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace |
| 115 | + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores |
| 116 | + * (`myapp_subsection_filterx`). |
| 117 | + * </div> |
104 | 118 | * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
|
105 | 119 | * of the registered filter instances.
|
106 | 120 | */
|
|
0 commit comments