AngularJS-filter
filter
- - filter in module ng
Selects a subset of items from array
and returns it as a new array.
Usage
In HTML Template Binding
1 {{ filter_expression | filter : array : expression : comparator}}
In JavaScript
1 $filter(‘filter‘)(array, expression, comparator)
Arguments
Param | Type | Details |
---|---|---|
array | Array |
The source array. |
expression | stringObjectfunction () |
The predicate to be used for selecting items from Can be one of:
|
comparator | function (actual, expected)trueundefined |
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:
|
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。