简体   繁体   English

角度过滤器在ng-repeat中不起作用

[英]Angular filter not working in ng-repeat

All code here: http://stevendavisphoto.com/mc/ 此处所有代码: http : //stevendavisphoto.com/mc/

Filter: <input type="text" ng-model="search">
<tr ng-repeat="(id, group) in groups | filter:search" class="editing-{{group.editing}}">

I want the rows to filter out if they don't match what's in the input. 如果行与输入的内容不匹配,我希望将其过滤掉。 It doesn't seem to do anything. 它似乎什么也没做。 I know {{search}} is changing, but the filter isn't working. 我知道{{search}}正在更改,但是过滤器无法正常工作。

The orderByPriority filter is provided by AngularFire to convert an object returned by $firebase into an array. AngularFire提供了orderByPriority过滤器,可将$ firebase返回的对象转换为数组。 The objects in the array are ordered by priority (as defined in Firebase). 数组中的对象按优先级排序(如Firebase中所定义)。 Additionally, each object in the array will have a$id property defined on it, which will correspond to the key name for that object. 此外,数组中的每个对象都将具有定义的$ id属性,该属性对应于该对象的键名。

http://ericsaupe.com/angularfire-filtering-data-returned-by-firebase/ http://ericsaupe.com/angularfire-filtering-data-returned-by-firebase/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM