Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 3 Slides Component - Implement next and previous button

I am new in IONIC 3, I try to implement Slider in my Ionic App and I try to Implement next and previous button for slide.

Like:

enter image description here

Please help me for its functionality.

like image 796
Neotrixs Avatar asked Nov 20 '25 01:11

Neotrixs


1 Answers

According to the official documentation here, you can call either the slideTo() or slideNext() methods. For example (taken from the official Ionic v2+ documentation):

this.slides.slideTo(2, 500);

This would take you to the third slide, with a transition time of 500ms.

For changing to the previous or next slide you could either use the slideNext() and slidePrev() functions or save an index for the current slide and simply increment or decrement it, while passing it as a parameter to the slideTo() function.

like image 168
Gabriel Lovetro Avatar answered Nov 22 '25 17:11

Gabriel Lovetro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!