Using IONIC 4 ion-slides, I am trying to get currently clicked silde index using getActiveIndex() as below which it is not working.

```
<ion-slides #testSlider (ionSlideTap)="getIndex()">
 <ion-slide>....</ion-slide>
</ion-slides>

@ViewChild('testSlider') slider: ElementRef;  // first way

getIndex() {
     this.slider.nativeElement.getActiveIndex();
}

@ViewChild('testSlider') slider: Slider; //second way

getIndex() {
     this.slider.getActiveIndex();
}

```

And the another way as below which is also not working: 

```
<ion-slides #testSlider (ionSlideTap)="getIndex(testSlider)">
 <ion-slide>....</ion-slide>
</ion-slides>

getIndex(testSlider) {
     testSlider.getActiveIndex();
}

```

Can anyone please suggest me how can I get **active index** or **currently clicked slide index** in IONIC 4 ?