Ionic 2 - ionSlideTap get slide

Hi all,

I am using ion-slides on Ionic 2.

I would like to get the slide item clicked when a ionSlideTap event is emitted.
Do you know how to do that?

Here is my code:

<ion-slides  pager="true" slidesPerView='3' loop="true" (ionSlideTap)="slideClick()">
      <ion-slide *ngFor="let item of items" >
          <img src='{{item.image}}' />

console.log(‘click on slide #’, item);

It looks like it is undocumented for now but if you browse through the source code there is a property “clickedIndex” or “clickedSlide” that will work.

So your code will look like that:

let theClickedIndex = this.slider.clickedIndex;
console.log('clicked on slide ', theClickedIndex);