view raw
Jay Shukla Jay Shukla - 7 months ago 37
AngularJS Question

How to pass multiple parameter in angular filter function, not custom filter

I tried hard and visit lot of similar question like this but still unable to solve this issue.

I want to pass extra parameter in angular filter function. I found solution as below but it's not working. I am getting undefined for object which I have used in


<li ng-repeat="user in users | filter:isStatus(user,secondParam)">{{}}</li>

There are solution for angular custom filter as below but that also not working with angular filter function.

<li ng-repeat="user in users | filter:isStatus:user:secondParam">{{}}</li>

jsFiddle - You can see my problem here.


Will try:

$scope.isStatus = function(secondParam, thirdParam){
      return function(user) {
           return user.status == $scope.status;

Updated version