可以在过滤器中使用循环变量吗?

时间:2013-06-04 21:21:39

标签: loops angularjs

AngularJS中是否存在以下某种概念:对于字符串和布尔属性?

<li ng-repeat="person in people | filter:'person.isMale'">

1 个答案:

答案 0 :(得分:1)

尝试

<li ng-repeat="person in people | filter:{isMale:true}">

<li ng-repeat="person in people | filter:{isMale:1}">

取决于您的数据