I have 4 screens for home screen. i want the first screen to just automatically swipe to the next after 2sec, and the remaining screens to be swipable. i used swiper for the screens but i cant figure out how to make the first screen swipe to the next after a given time. im very new to programming and new to ionic as well. my code goes like this. i put settimeout to call slidenext after 1000ms inside ngoninit so that it will function upon it loads
export class HomePage {
config: SwiperOptions = {
spaceBetween: 50,
pagination: { clickable: true},
};
@ViewChild('swiper', { static: false }) swiper?: SwiperComponent;
slideNext(){
this.swiper.swiperRef.slideNext(1000);
}
constructor() {}
ngOnInit() {
setTimeout(() => {this.slideNext(), 1000})
}
}