Here is a small example of my html using ng-repeat
:
<div ng-repeat="item in vm.templateList | filter: vm.myFilter">
<h3>{{item.Code}}</h3>
</div>
In Js file the vm.templateList
is as followed(as an example):
vm.templateList = [{Code: 'a', ID: 1},
{code: 'a', ID: 2},
{code: 'b', ID: 3},
{code: 'c', ID: 4}];
Imagine I want to filter this list for all items that have ID 1 and also items that have ID 2.
What I originaly was doing was like this:
vm.filter = {ID: 1};
But this was I can only filter the list on 1 ID. Can anyone suggest a way?