Apply Angular ng-repeat orderBy and filter to data before ajax request

Viewed 149

I have a table with the following ng-repeat clause..

ng-repeat="playlist in playlists | orderBy:sortType:sortReverse | filter : searchExpression(searchText)"

I'd like to send the same ordered and filtered list via ajax request.

How do I apply the same filters to..

$scope.playlists

So that the array matches what is shown in the ng-repeat clause

1 Answers
Related