How to dismiss ion-slides in ionic2?

256 views Asked by At

I'm using <ion-slides> as introduction screens at full screen mode in my application. I could able to swipe through all slides. But couldn't able to find a method to dismiss or close the slides.

<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>

Application Screenshot

1

There are 1 answers

0
sebaferreras On

In order to do so, you have to include a button in the last slide, and bind the click event of that button to a method (defined in your component code). Inside that method, use the this.navCtrl.push(TheNextPage); to go to another page.