八、angularjs 中 filter在controller中的使用--避免多次遍历

filter在html页面的使用司空见惯,比如:

filter在controller中使用可以避免多次使用angular.foreach,来进行遍历。例如:

如果使用filter,则会让代码简洁而且明亮许多:

原文地址:https://www.cnblogs.com/gunelark/p/7290626.html