0

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.

timrijkse
  • 31
  • 4
  • you watched angular ui ng-grid? it might be usefull for you – daremachine Oct 29 '13 at 11:53
  • Yeah I'm having a look at it now. The thing I'm worrying about is the tweens between pages. Is this possible with ng-grid? Can't find any references. – timrijkse Oct 29 '13 at 12:34
  • I don't think ng-grid will do the trick for me. It is a great module to use when having tabular data but the slides I have to make are something like this: http://t.blck.lv/image/3F2A0v1z2D0w I've tried to customise the templates for ng-grid but I don't want to have different cells for each variable. I just want to use {{ title }} - {{ category }} for example. – timrijkse Oct 29 '13 at 14:06
  • you watched angular ui-bootstrap carousel? It is what you need? http://angular-ui.github.io/bootstrap/ .. if you interested you look to all plugins are very usefull. http://angular-ui.github.io/ – daremachine Oct 30 '13 at 17:19

0 Answers0