mihnsen / ui-carousel

A simple, lightweight module for carousel in your AngularJS app, Inspired from slick carousel.
http://mihnsen.github.io/ui-carousel/
MIT License
77 stars 67 forks source link

Carousel does not automatically start cycling on pageload #48

Open MohammedMubeen opened 6 years ago

MohammedMubeen commented 6 years ago

Hi Folks,

Please help me. Page load Carousel cycling automatic how to stop. after prev or next click only it should be cycling.

concepta-thiago commented 6 years ago

I have the same issue, was you able to find the solution?

TarikTz commented 6 years ago

When you load your content async it won't start autoplay. I'm trying to make some kind of a hack right now, I guess solution will be to simulate click on prev or next button.

leap0ffaith commented 6 years ago

Is there any update?

nocerALE commented 5 years ago

I have the same issue, @TarikTz did you find a solution ?

TarikTz commented 5 years ago

@nocerALE Yes I have, I've created timeout function which calls click triggerHandler on .carousel-next element. Here is a preview:

vm.handleAsyncLoad = () => { $timeout(function() { angular.element('.carousel-next').triggerHandler('click'); }, 5000); };

And I've called this functions after http get request return success.