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

Function defined on on-init is not working #4

Closed aparnacyanam closed 7 years ago

aparnacyanam commented 7 years ago

I have been using your package to add a carousel.When I load my page, entire page loads first and then after less than 2 secs, the carousel appears.So I wanted to add a loading spinner so that when the carousel is ready, the entire page loads up with no sudden appearance of the carousel.In my controller code, I have initialized a variable with true and want to change that value to false when the carousel is ready.I have added on-init="onCarouselReady()" in html and defined the same function in controller.But looks like the function is not even called.Would you please help me in fixing this and let me know if I am missing anything.

mihnsen commented 7 years ago

I realize that the onInit is called too soon. I've update package and move onInit to after the track is successful initialize. Here is the pen http://codepen.io/mihnsen/pen/ZejQBJ

mihnsen commented 7 years ago

Looks like it solved, close now. Could be reopen later