angular 自定义filter

用modul.filter

 1 .filter("fiilterCity",function(){
 2              return function(obj){
 3             var newObj = [];
 4            angular.forEach(obj,function(o){
 5                     if(o.city === "上海"){
 6                         newObj.push[o]
 7                     }
 8                 })
 9                   return newObj
10 }
11 })
原文地址:https://www.cnblogs.com/bhan/p/5431308.html