![]() |
VOOZH | about |
The "filter" Filter in AngularJS is used to filter the array and object elements and return the filtered items. In other words, this filter selects a subset (a smaller array containing elements that meet the filter criteria) of an array from the original array.
Syntax:
{{arrayexpression | filter: expression : comparator : anyPropertyKey}}
Parameter Values:
Example 1: This example describes the AngularJS filter Filter by filtering & rendering the name only having the character "e" in the name.
Output:
Example 2: This example uses an object to filter its element.
Output:
Example 3: In this example, we are going to see a "strict" caparison that does not return any value unless it is a pure match.
Output:
Note: If you notice that the last Chinchwad in the array is not included in the list, because the last Chinchwad contains space before itself.