I'm trying to make a filter inside a ng-repeat based on a custom filter that receives two parameters. At the same time, one of those parameters is one property of the object on the repeat.
So in my ng-repeat code I have:
<tr ng-repeat="player in myTeam | bitwiseAnd:{firstNumber: player.Flag, secondNumber: type}">
But it's not working. If I debug it, the filter is receiving in the first parameter undefined.
I've read the documentation : https://docs.angularjs.org/guide/filter
I've read also multiple related questions in SO
- Filtering by Multiple Specific Model Properties in AngularJS (in OR relationship)
- Passing arguments to angularjs filters
- How do I call an Angular.js filter with multiple arguments?
Without success.
I've created a plunker where we can see how the filter is working properly when I use it as an expression, so probably the problem is sending the values inside the ng-repeat statement.
Here is the plunker: http://plnkr.co/edit/IGvDBq?p=preview
Thanks for your time