角 - 我怎么能看的过滤结果数组从控制器的变化 [英] Angular - how can I watch a filter result array for changes from the controller
本文介绍了角 - 我怎么能看的过滤结果数组从控制器的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个过滤器,通过一个NG重复列出了一些标准的过滤器。
I have a filter that filters with some criteria through a ng-repeat list.
我怎么能看结果数组由过滤服务的内部控制?
How could I watch the RESULTING array that is made by the filtering service for changes INSIDE the controller?
完整的问题,并说明是这里<一个href=\"http://stackoverflow.com/questions/18773992/angular-factory-filter-cant-get-data-passed-to-the-filter\">Angular工厂过滤器 - 无法获取传递给过滤器数据中的第一个答案
The full Question and description is here Angular factory filter - Can't get data passed to the filter in the first answer.
推荐答案
怎么样通过这样的本地方法管道您的数据?
What about piping your data through a local method like this ?
<li ng-repeat="item in catchData((items|cut:max))">...</li>
我毫不犹豫地掏出一个完整的例子在这里 http://plnkr.co/edit/2L25wdB6S8GG659H4jPw p = preVIEW
这篇关于角 - 我怎么能看的过滤结果数组从控制器的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文