Selects a subset of items from array
and returns it as a new array.
{{ filter_expression | filter : expression : comparator : anyPropertyKey}}
$filter('filter')(array, expression, comparator, anyPropertyKey)
Param | Type | Details |
---|---|---|
array | Array | The source array. |
expression | string Object function() | The predicate to be used for selecting items from Can be one of:
|
comparator (optional) | function(actual, expected) true false | Comparator which is used in determining if the expected value (from the filter expression) and actual value (from the object in the array) should be considered a match. Can be one of:
Defaults to |
anyPropertyKey (optional) | string | The special property name that matches against any property. By default |
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ng/filter/filter