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


i tried hard , visit lot of similar question still unable solve issue.

i want pass parameter in angular filter function. found solution below it's not working. getting undefined object have used in ng-repeat.

<li ng-repeat="user in users | filter:isstatus(user,secondparam)">{{user.name}}</li> 

there solution angular custom filter below not working angular filter function.

<li ng-repeat="user in users | filter:isstatus:user:secondparam">{{user.name}}</li> 

jsfiddle - can see problem here.

will try:

$scope.isstatus = function(secondparam, thirdparam){       return function(user) {            console.log(secondparam);            console.log(thirdparam);            return user.status == $scope.status;      } 

updated version http://jsfiddle.net/4pyza/282/


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -