devmark / angular-slick-carousel

Angular directive for slick-carousel
http://devmark.github.io/angular-slick-carousel/
MIT License
353 stars 125 forks source link

Slick Carousel and Ionic #114

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello, I'm using slick carousel in my Ionic project but I have a problem: when run the app, the carousel works very well but I noticed that when open a Modal ($ionicModal) and return in the view where live my carousel I obtain a bad effect. The Carousel is break: I haven't the vertical list and not an horizontal list. How can fix it? Thanks"

I noticed that in my html, when the carousel is ok, I have on element with class "slick-track": style="opacity: 1; width: 2160px; transform: translate3d(0px, 0px, 0px);" when I change page and open a modal I have this one: style="opacity: 1; width: 0px; transform: translate3d(0px, 0px, 0px);"

This is my configuration: vm.slickConfig = { autoplay: false, infinite: false, mobileFirst: true, slidesToShow: 5, slidesToScroll: 5, prevArrow: '#prev-btn', nextArrow: '#next-btn', dots: false, arrows: true, method: {}, event: { init: function (event, slick) { slick.slickGoTo(currentWeek); // slide to correct index when init } } };

guoliming110 commented 6 years ago

How did you solve it? I had the same problem.