Closed nikksan closed 6 years ago
Thanks, @nikksan!
You could use a setInterval
got to slide to automatically change slides. Is that what your looking to do. go t a slide after a few seconds or so?
Yeah, that will do it. How do I programmatically change the slides?
The Slides Component has a public function on it to to go to GoToSlide
( goes to slide with index param) and next and previouse slides. https://github.com/TheOriginalJosh/nativescript-ngx-slides/blob/master/slides/app/slides/slides.component.ts#L541
Works like charm.I actually ended up using the method - nextSlide, as it didnt require me to keep the index of the current slide.
Is there any event triggered when the user swipes the slider? My approach is to postpone the the interval, once the user has interacted with the slider. Any help on that?
Yep there is a change event https://github.com/TheOriginalJosh/nativescript-ngx-slides/blob/master/slides/app/slides/slides.component.ts#L63 that sounds like what you need
However this change event is fired when I call nextSlide method, is there any way I can detect when user swipes the slide, and not when I programmatically change it?
Hi @nikksan, no there is currently no way to differentiate between those. If you want you could change the code so it returns an object that has the index and the referring action. If you do please make a PR.
Hello, great plugin first! Is there any way the slider can start automatically?