Topic: Carousel change slide programmatically
Hi,
I need to change current slide of a carousel programatically, using previousSlide() and nextSlide() methods.
Could you give me an example of how I can call this methods please?
Thanks
Marco
Damian Gemza staff answered 5 years ago
Dear @bitjuice
You have to use those methods from the CarouselComponent
class.
Add the template reference (#
sign) to the mdb-carousel
element, and then use the ViewChild
class to get the CarouselComponent
class instance, and with this, you're able to call the previousSlide()
and nextSlide()
methods.
Best Regards,
Damian
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 8.0.0
- Device: PC
- Browser: Chorme
- OS: Windows 10
- Provided sample code: No
- Provided link: No