GithubHelp home page GithubHelp logo

Comments (8)

JoshDSommer avatar JoshDSommer commented on June 16, 2024

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?

from nativescript-ngx-slides.

nikksan avatar nikksan commented on June 16, 2024

Yeah, that will do it. How do I programmatically change the slides?

from nativescript-ngx-slides.

JoshDSommer avatar JoshDSommer commented on June 16, 2024

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

from nativescript-ngx-slides.

nikksan avatar nikksan commented on June 16, 2024

Works like charm.I actually ended up using the method - nextSlide, as it didnt require me to keep the index of the current slide.

from nativescript-ngx-slides.

nikksan avatar nikksan commented on June 16, 2024

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?

from nativescript-ngx-slides.

JoshDSommer avatar JoshDSommer commented on June 16, 2024

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

from nativescript-ngx-slides.

nikksan avatar nikksan commented on June 16, 2024

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?

from nativescript-ngx-slides.

JoshDSommer avatar JoshDSommer commented on June 16, 2024

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.

from nativescript-ngx-slides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.