我有對象數組。當我需要篩選單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;
但不是工程..任何一個指導我好嗎?