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?

2
  • 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. Commented Feb 7, 2014 at 20:52
  • @tymeJV Do you have an example of that? i'm trying with: ng-repeat="(index,master) in repeatingData | limitTo:8" Commented Feb 7, 2014 at 21:03

1 Answer 1

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. :)

Sign up to request clarification or add additional context in comments.

1 Comment

Appears that will work for me, but there are some issues with it - $digest bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.