https://stackoverflow.com/a/41790532/7453272
How to reset my filter object with ng-click ? I want return my object with full body.
https://stackoverflow.com/a/41790532/7453272
How to reset my filter object with ng-click ? I want return my object with full body.
This will toggle the filter:
$scope.setCatFilter = function(id){
if($scope.catFilter == id)
$scope.catFilter = undefined;
else
$scope.catFilter = id;
}
so the reset function will be
$scope.resetCatFilter = function(){
$scope.catFilter = undefined;
}
or
<span ng-click="catFilter=undefined">reset</span>