I have an array of items which I want to filter on different kinds of filters. Because I have more than 2000 items I want to paginate between pages so I've created a startFrom directive and used angulars limitTo directive. This is all working fine but here is my problem:
The page uses next/previous arrows to tween between the pages. So clicking on the next button should inject a new div after the existing one and then tween to the new page. When the tween completes I want to dispose the old page. I'm using Angular 1.0.8 so I'm not able to use ng-animate. What is the best approach to make this happen?
Many thanks in advance!
EDIT: I've tried to parse my data object into a new object to create slides:
Data from db:
$scope.data = [{id: 1}, {id: 2} etc...]
After manipulation:
$scope.slideData: [
{
[{id: 1}, {id: 2}, {id: 3}. {id: 4}],
[{id: 5}, {id: 6}, {id: 7}. {id: 8}]
etc...
}
]
The problem is this is way to heavy since the object has to be rebuilt every time a filter changes.