You can use the function to return filtered results when you need them.
function getFilteredResults() { return $scope.$eval("person in contacts|filter:searchText|filter:groups|orderBy:['name','email']"); }
And if you just want to filter the results, not the paginated results, you could.
<dir-paginate="person in filteredPersons = (contacts|filter:searchText|filter:groups|orderBy:['name','email']) | itemsPerPage : 10">
And if you need a page of filtered results, you can handle this in your controller like this.
function getFilteredPersonsOnPage() { var end; var start; var itemsPerPage = parseInt($scope.queryState.pageSize) || 999; start = ($scope.currentPage - 1) * itemsPerPage; end = start + itemsPerPage; return $scope.filteredPersons.slice(start, end); }
source share