Topic: how to make carousel auto play?

jadoon saleem premium asked 3 years ago


how to make carousel auto play?

I have form that contain number of carousel (number is not constant), how to make them all autoplay ?

Thanks.


Arkadiusz Idzikowski staff commented 2 years ago

@jadoon saleem Can you provide more information about the problem? Our carousel should have autoplay enabled by default if you used examples from our documentation without any modification:

https://mdbootstrap.com/docs/angular/advanced/carousel/


jadoon saleem premium commented 2 years ago

hi @Arkadiusz Idzikowski , it is not work for me , autoplay doesn't work by default , I had to add the following code to make this work: I had to add this code:

public host : String; @ViewChild('carouselRef', { static: false }) private carouselRef: CarouselComponent; setTimeout(() => { if ( this.stores[0].imagesPath && this.stores[0].imagesPath.length > 0) { this.carouselRef.nextSlide(); } }, 4000);

but the following solution is good for one carousel , but on my situation I have dynamic number of carousel . I using angular 8 , maybe should to update the version of the angular ? and there a way to do that for all carousel by JS code?

Thanks!


Arkadiusz Idzikowski staff commented 2 years ago

@jadoon saleem Please update your first post and add an example HTML/TS so we can reproduce this problem on our end.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB4 11.0.0
  • Device: all
  • Browser: all
  • OS: all
  • Provided sample code: No
  • Provided link: No