Skip to content

Slick Carousel and Ionic #114

Open
Open
@ghost

Description

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
}
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions