0

I've got a bunch of data I would like to display in a sliding carousel type layout. Ideally we would show 8 of these data points in each slide, so that it would look something like this:

Slide
    datapoint 1
    datapoint 2
    datapoint 3
    datapoint 4
    datapoint 5
    datapoint 6
    datapoint 7
Slide
    datapoint 8
    datapoint 9
    datapoint 10
    datapoint 11
    etc etc...

Now I know how to iterate over these datapoints using ng-repeat, however, i'm not sure how I can iterate while grouping them into their own respective groups.

Currently i'm using ng-repeat="(index, master) in data" to iterate, but obviously, this gives me a list of items without the grouping that i'm after.

Any ideas?

flashpunk
  • 772
  • 2
  • 13
  • 38
  • `limitTo` can be applied to `ng-repeat`, or you may need an `ng-if` and check that the `$index % 8 == 0` for a new slide, or you setup a paging system and keep track of the skip and limit. – tymeJV Feb 07 '14 at 20:52
  • @tymeJV Do you have an example of that? i'm trying with: ng-repeat="(index,master) in repeatingData | limitTo:8" – flashpunk Feb 07 '14 at 21:03

1 Answers1

0

take a look in here. angular grouping filter

There's nice example about grouping. This may be the thing you need.

Edit: wrong link. :)

Community
  • 1
  • 1