Disable swipe on specific slide

Hello I want to disable the swipe on only one slide. In case the second slide

I want disable swipe on only second slide because when I moving the map it makes me change slides.

But when I use this.slides.lockSwipes(true); it disable swipe on all slide…

And I would like disable swipe on the second slide but that the button Next still works.

Thanks in advance ! :slight_smile:

Please no one has the solution to my problem?

Try to use the this.slides.lockSwipes(true); method in ionViewWillEnter() to lock them and this.slides.lockSwipes(false); in ionViewWillLeave() to unlock them within the page with the map.

2 Likes

Thanks but I work with 4 slides and I want to desable swipe on only one slide, no all slides. ionViewWillEnter() runs when the page is about to enter and become the active page

Oh ofcourse, my mistake. I thought the slides were different pages.

No I have 4 slides, here is my problem lol

I can’t try it myself atm but you could check: https://stackoverflow.com/questions/43229873/ionic-2-how-to-prevent-page-changes-on-ion-slides-by-swipe-gesture/43231343

Thank you it work ! :slight_smile:

1 Like