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

前端 未结 4 2128
傲寒
傲寒 2021-02-20 14:45

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 solutio

4条回答
  •  甜味超标
    2021-02-20 15:06

    How do I call an Angular.js filter with multiple arguments?

    AngularJS : Custom filters and ng-repeat

     myApp.filter("isStatus ", function() { // register new filter
         return function(user, secondParam, thirdParam) { // filter arguments
    
           return user.status == $scope.status; // implementation
        };
     });
    

    Calling from Template

  • {{user.name}}
提交回复
热议问题