I am working on a old angular.js project where I want to filter a table based on some other sets of array, including the first. How can I achieve that ?
Example:
$scope.devFilters =[]; $scope.filList=[ {"Id": "122h33jjhuii2000","Fleet": "009"},{"Id": "122h222iyui2001","Fleet": "076"}];
in table I have -
<tr ng-repeat="dev in (filList = (filList | orderBy:sortField:reverseSort | filter:devFilters | limitTo:totalDisplayed ))">
<td>dev.Id</td>
<td>dev.Fleet</td>
</tr>
Now, I have another set of array by which I want to filter as well.
$scope.conf = [{"Reset":"BYC","Fleet":"kio000"},{"Reset":"DDD","Fleet":"?"}]
<div class="filterf">
<h4>Search by Reset</h4>
<input ng-model="devFilters.Reset" ng-change="search();" />
</div>
If I type BYC then the row related to BYC should appear. The problem is how I can merge these 2 array and use filter ? Or is there any other way where I can use two array in filter ?