Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AfterChange event wasn't triggered #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mamzellejuu
Copy link

The script never enter in

slider.on('afterChange', function (event, slick, currentSlide, nextSlide) {
       if (scope.onAfterChange) {
                scope.onAfterChange();
       }
       if (currentIndex != null) {
           return scope.$apply(function () {
               currentIndex = currentSlide;
               return scope.currentIndex = currentSlide;
           });
     }
});

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

@Disorrder
Copy link

isn't it fixed in version 1.6? Well, angular-slick uses

"dependencies": {
    "angular": "~1.3.0",
    "slick-carousel": "~1.4.1"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants