I have created the following filter in angular.js. Now I am trying to use the indexOf to remove the country variable by splice I always get the error saying _filters.indexOf is not a function:
.filter('MyFilter', function () {
return function (_filters) {
_filters = _filters.splice(_filters.indexOf(_filters['country']), 1);
}
})
The filter object looks like this:
{
"rate": 5,
"country": [
"Russia",
"Polen",
"France"
],
"city": [
"Dubai"
]
}