根据链接 - http://plnkr.co/edit/eCRsfwMEEYX5iGsraqjd?p=preview
我实现了复选框选择。现在我必须根据详细选择进行过滤
"如何获取数组中的选定值并根据所选的数组值进行过滤,
在我手动检查的每个选定值的源代码下面,但我需要动态检查。"
请任何人帮助实现这一目标。
$scope.objectFilterSubmit = function () {
if($scope.selected.length>1) {
$scope.IsActive = "";
$scope.selectedObjectDatas = $scope.getCustomObjectsBasedOnObjectTypeSelection($scope.IsActive);
clearPartialElement();
$scope.objectCreationPage();
} else {
angular.forEach($scope.selected, function(value,key){
if(angular.equals(value, "Show Activated")) {
$scope.IsActive = "true";
$scope.selectedObjectDatas = $scope.getCustomObjectsBasedOnObjectTypeSelection($scope.IsActive);
clearPartialElement();
$scope.objectCreationPage();
}
else if(angular.equals(value, "Show InActivated")) {
$scope.IsActive = "false";
$scope.selectedObjectDatas = $scope.getCustomObjectsBasedOnObjectTypeSelection($scope.IsActive);
clearPartialElement();
$scope.objectCreationPage();
}
else {
$scope.IsActive = "";
$scope.selectedObjectDatas = $scope.getCustomObjectsBasedOnObjectTypeSelection($scope.IsActive);
clearPartialElement();
$scope.objectCreationPage();
}
});
}
};