I have a button in my view. When I press my button I want to filter my table. My table have element called market it can be "ios" or "android". When I press "ios" button I want to show only data which have "ios" as market. In default table view all data (both ios and android).
button
<button ng-click="applyiosfilter()">Search</search>
table
<tr dir-paginate="datad in downloadsdata|filter:downloadfilter"> ...
</tr>
arrays for sore data
$scope.downloadsdata = [];
$scope.downloadfilter = [];
add data in to scope
$scope.applyiosfilter = function() {
angular.forEach($scope.downloadsdata, function(value, key) {
if(value.market==='ios') {
$scope.downloadfilter[key] = $scope.downloadsdata[key];
}
});
};