Ionic 2.0.0 ionSlideDidChange only take effect when effect input equals to 'slide’


#1

if effect is equal to ‘coverflow’ etc and I slide smoothly then event doesn’t fire.
but, if I slide fastly then event it’s fired

//it always work
<ion-slides (ionSlideDidChange)="slideChanged()">

//it doesn’t always work
<ion-slides (ionSlideDidChange)="slideChanged()" effect="coverflow">


#2

Hmm it appears you are correct. I’m seeing this in a plunkr all the way back to rc5 when the new slides refactor went it.
Can you open an issue on github with this information and post the plunkr as well?


#3

Hi @mhartington, thx for your answer, do you have a template plunkr for ionic 2.0.0 final? :slight_smile:

anyway, I think this issue is an issue from Swiper.js.
Ionic 2 RC-4 and RC-5 have this issue too.

When I previously accessed to raw Swiper.js in ionic 2 had this issue too.

Therefore, I used ‘onTransitionEnd’ from Swiper.js that worked for me.

mySlideOptions = {
    loop: false,
    onInit: s => {
        this.swiper = s;
    },
    onSlideChangeEnd: s => {
        //this.onDidChange();
    },
    onTransitionEnd: s => {
        this.onTransitionEnd(); <-- I used this
    },
    effect: 'coverflow',
    centeredSlides: true,
    slidesPerView: 1,
    coverflow: {
        rotate: 50,
        stretch: 0,
        depth: 100,
        modifier: 4,
        slideShadows: false
    }
};