I'd like to use multiple filters on the same item for an ng-repeat. The idea is that for each job below I have different properties like location and salary and I'd like to be able to filter the results with both criteria.
So far, I've tried this:
<div ng-repeat="job in jobs | filter: location | filter: salary">
But it's obviously not working.
Does anyone have a clue how to fix this?
Thanks
You can create a custom filter.
<div ng-repeat="job in jobs | filter:customFilter">
And in your controller :
$scope.customFilter = function(item) {
if('Condition on your item')
return true;
return false;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With