vasyabigi / angular-slick

Angular directive for slick-carousel
http://vasyabigi.github.io/angular-slick/
MIT License
500 stars 237 forks source link

Using the directive with dynamic data #63

Open therealbenhogan opened 9 years ago

therealbenhogan commented 9 years ago

Hi,

I've been trying to use the directive with my own one which retrieves the images from my server. What's the best way to do this? The way I'm doing it displays the images but the animation isnt working.

Here's the mark up calling the directive

<slick autoplay="true" arrows="true" dots="true" class="slider" section="page"></slick>

I've then got my own directive called "slider" which gets the images from the server (using the section attribute to help identify them) and in the template url of the directive I'm doing this

`

{{item.meta}}

`

I also tried putting the slick directive in my own template url - but neither work. The images display but the animation doesn't work.

daemonchen commented 9 years ago

I have the same problems, I use ng-repeat to dynamic render my slide's items, and then the animation doesn't work...

therealbenhogan commented 9 years ago

Hi,

Try out angular-flexslider instead - hope that helps!

adskiremote commented 9 years ago

You don't have to. Angular-Slick handles data perfectly well.

For my example I'm returning my $resource data to $scope.events. So... Just make sure you have this in your slick..

init-onload=true data="events"

Where "events" is your data. If it still doesn't work let me see your code.

therealbenhogan commented 9 years ago

Hi,

Many thanks for getting back - that's great, thank you

daemonchen commented 9 years ago

copy that, thanks a lot.

esperancaJS commented 9 years ago

but for data the changes multiple times this still doesn't seem to work :(