我有对象数组。当我需要筛选单vaue对象我这样做是这样的:如何过滤具有多个值的对象?
$scope.filteredByPhase = $filter('filter')($scope.allApps, {Phase:"All"});
$scope.allAppsBatch = $scope.filteredByPhase;
但作为一个选择,我想通过在‘全部’或‘家’,以过滤由2“Phase`值的对象这种情况下如何过滤?
我想是这样的:
$scope.filteredByPhase = $filter('filter')($scope.allApps, {Phase:("All" || "Home")});
$scope.allAppsBatch = $scope.filteredByPhase;
但不是工程..任何一个指导我好吗?