Closed tejasrivastav closed 7 years ago
Pagination values ARE correct, because you assign filteredDesserts
to desserts.data
.
This works:
... ng-repeat="dessert in (filteredDesserts = (desserts.data | filter: search) | orderBy: query.order | limitTo: query.limit : (query.page -1) * query.limit)" ...
So, you need to filter desserts and after that order and limit.
Even in that case the resultant array has only 5 values.
Sorry, but I don't see any changes in your codepen. Did you update it with recommended ones?
sorry, updated link http://codepen.io/anon/pen/RpJwqd?editors=1010
You need to put a bracket not at the end, but after filter:search
. Take a look at recommended changes in my comment. :)
Like that:
(filteredDesserts = (desserts.data | filter: search) | orderBy: query.order ...)
My bad. Noob Me. Thanks a ton. :)
http://codepen.io/anon/pen/LxOKZd?editors=1010,
Enable search with client side pagination. The pagination values are incorrect.