I have one json dataset in angular say
$scope.data = [{
call_id: '1',
title: 'test',
start: new Date(elem.call_date),
backgroundColor: "#9f1eab",
borderColor: "#9f1eab",
filterByCheckbox: 'filterOne'},
{
call_id: '1',
title: 'test',
start: new Date(elem.call_date),
backgroundColor: "#9f1eab",
borderColor: "#9f1eab",
filterByCheckbox: 'filterTwo'
}];
Now I have 3 checkox
filterOne
filterTwo
filterThree
Now I want to filter $scope.data
based on above 3 checkbox selection.
Column to filter in $scope.data
is filterByCheckbox
So above is my data set which contains list of records having column filterByCheckbox
I want to filter data based on that column.
If first 2 checkbox checked,$scope.data
should be filtered on column filterByCheckbox
containing filterOne
and filterTwo
value.
How can i achieve this in angularjs?
I have tried:
$filter('filter')($scope.data, { filterByCheckbox: 'filterTwo' })
But it works for only one checkbox.