Ionic 2 sliders and onSlideNextStart(swiper)

I am trying to make onSlidePrevStart: (swiper) work on ion-slides.
I am able to get onSlideChangeStart to work but I am unable to check if I am moving forward of back ward.

Any ideas how I can do that?


This would be forward:

if (slides.activeIndex > slides.previousIndex)

and this would be backward:

if (slides.activeIndex < slides.previousIndex)

1 Like