This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ E.g. the markup `{{ 1234 | number:2 }}` formats the number 1234 with 2 decimal p
29
29
{@link ng.filter:number `number`} filter. The resulting value is `1,234.00`.
30
30
31
31
32
- ## Using filters in controllers and services
32
+ ## Using filters in controllers, services, and directives
33
33
34
- You can also use filters in controllers and services . For this, add a dependency with the name `<filterName>Filter`
35
- to your controller or service. E.g. using the dependency `numberFilter` will inject the number filter.
36
- The injected argument is a function that takes the value to format as first argument and filter parameters
37
- starting with the second argument.
34
+ You can also use filters in controllers, services, and directives . For this, inject a dependency
35
+ with the name `<filterName>Filter` to your controller/ service/directive . E.g. using the dependency
36
+ `numberFilter` will inject the number filter. The injected argument is a function that takes the
37
+ value to format as first argument and filter parameters starting with the second argument.
38
38
39
39
The example below uses the filter called {@link ng.filter:filter `filter`}.
40
40
This filter reduces arrays into sub arrays based on
You can’t perform that action at this time.
0 commit comments