I want to disable swipes on my ion-slides.
home.html
<ion-slides>
<ion-slide>
<h1>Slide 1</h1>
</ion-slide>
<ion-slide>
<h1>Slide 2</h1>
</ion-slide>
<ion-slide>
<h1>Slide 3</h1>
</ion-slide>
</ion-slides>
home.ts
...
@ViewChild(Slides) slides: Slides;
....
constructor(public navCtrl: NavController, public navParams: NavParams) {
this.slides.lockSwipes(true);
}
...
But this gives a lot of errors…can anyone tell what may be the issue?
ERRORS:
Uncaught (in promise): TypeError: Cannot read property ‘lockSwipes’ of undefined
TypeError: Cannot read property ‘lockSwipes’ of undefined
at new QuestionDetails…