Ion slider not working in model controller ionic 4

Version: Cordova: cordova-lib@8.1.1
Ionic: 6.10.1

Error : 1) this.slider.update is not a function
2) this.slider.slideNext is not a function

In .ts File

import { ModalController, IonSlides } from "@ionic/angular";

trainingSliderOpts = {
speed: 400,
initialSlide: 0,
preloadImages: true,
allowTouchMove: false,
};
result: any;
@ViewChild("trainingSlider", { static: true }) slider: IonSlides;

 ionViewDidEnter() {
this.slider.update();
}
1 Like

I have the exact same problem.

Please check https://stackoverflow.com/questions/63996626/ion-slider-not-working-in-modalcontroller-ionic-4/64008843?noredirect=1#comment113224499_64008843