Closed cindy-m closed 7 years ago
Hi @cindy-m, what you could do is set an interval to call the .next()
every few seconds.
you mean something like this: ngAfterViewInit() { var SlidesXml = this.slides.nativeElement; // SlidesXml.constructView(); setInterval(() => { SlidesXml.nextSlide(); }, 100); }
?? I am really new to nativescript (in combination with angular2), so I was wondering what the right way is to do set the interval
Got it working :D Thanks a lot :D :D
Awesome! 💃
If anyone needs in a plain JS, just follow this code:
slideContainer = page.getViewById('slideContainer')
setInterval(function () {
slideContainer.nextSlide()
}, 4000)
I implemented the slider with a few pictures. At the moment the pictures are first static until the user decides to slide them. So I was wondering it it is possible to let the slides rotate automatically (a sort of slideShow)??