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

Slick Carousel and Ionic #114

Open
ghost opened this issue Nov 24, 2016 · 1 comment
Open

Slick Carousel and Ionic #114

ghost opened this issue Nov 24, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 24, 2016

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
Copy link

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

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

No branches or pull requests

1 participant