vasyabigi / angular-slick

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

Init event wasn't triggered #166

Open mamzellejuu opened 7 years ago

mamzellejuu commented 7 years ago

The script never enter in

slider.on('init', function (sl) {
  if (attrs.onInit) {
    scope.onInit();
  }
  if (currentIndex != null) {
    return sl.slideHandler(currentIndex);
  }
});

The listener should be created before the slick plugin initialization. This will make sure that the event is not run before the listener created