Using ui-carousel with ngRepeat
isherwood opened this issue · comments
I have a list of elements that are generated with ngRepeat. I can't figure out how to implement this. It seems like it would be a common scenario, but my slides' data isn't being passed to the children of the carousel-item directives.
Here's my original markup:
<content-card flex="50" flex-sm="33" flex-md="25" flex-gt-md="20" layout="column" ng-repeat="content in $ctrl.content" content="content"></content-card>
And here's what I'm trying to do:
<ui-carousel slides="$ctrl.content" slides-to-show="3" slides-to-scroll="1" initial-slide="1">
<carousel-item>
<content-card layout="column" content="item"></content-card>
</carousel-item>
</ui-carousel>`
This throws an error because the 'content' attribute on the 'content-card' elements isn't being populated correctly.
Humm, I've create a pen http://codepen.io/mihnsen/pen/OmOLEQ and carousel still populated data to child element. You should take a look, thanks.
Thank you. I've gone with Flickity as it suited my needs a bit better.
according to your example http://codepen.io/mihnsen/pen/OmOLEQ - how to start carousel automatically though when the page loads?