IONIC 4 slider auto play stop while change page and go back on slider page

hi ionic i am using ionic 4 and my home page.ts is given bellow

import { Component } from ‘@angular/core’;

@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
})
export class HomePage {
slideOpts = {
effect: ‘flip’,
autoplay: {
delay: 2000
}
};

}

and home page.html is

<ion-slides loop=“true” pager=“true” [options]=“slideOpts” >









the slide auto play perfect while i go to home on first time but if i change page and go return home the slider auto play not working

1 Like

Facing same issue and if we do slide manually, then also auto play not working.

Same here, after tab change autoplay don’t works anymore.

its working for me…
ionViewWillLeave(){
this.slider.stopAutoplay();
}
//
ionViewDidEnter() {
this.slider.startAutoplay();
}

1 Like

Solution:
(ionSlideTouchEnd)=“slideChanged()” inside ion slides

slideChanged(){
    console.log("slide changed.");
    this.slides.startAutoplay();
  }

Perfect +1, This worked like a charm!