Do you want to apply a filter on moduleName
based on the value selected from a multi-select dropdown?
INFORMATION:
[
{
"_id": "59155aada593f4331499dd59",
"uswin": "lovelje",
"moduleName": "After Call Survey",
"accessLevel": "Read Only",
"reason": "A reason",
"status": "PENDING",
"date": 1493834611052,
"notifierEmail": null,
"__v": 0
},
// More data objects here
]
Filtered data:
[
{
"name": "After Call Survey",
"show": false
},
// More filtered items listed here
]
JAVASCRIPT
$scope.moduleFilter=function(entry){
$scope.checkedModules = $filter('filter')($scope.modules, {show: 'true'})
$scope.checkedModules=($scope.checkedModules.length===0?$scope.modules:$scope.checkedModules);
return $scope.checkedModules;
};
HTML
<div ng-repeat="request in (filteredItems = ((requests.value) | filter: { 'moduleName': moduleFilter } ))" class="col-xl-12 col-lg-12 col-md-12 col-sm-12 no-padding">
Please provide your input.