[ion-slides] autoplay stops working when I go back to page


#1

When the page first loads autoplay is ok, but when I go to other page and gat back the autoplay stops.

Anyone has some tips on how to solve this?


#2

Some code will help.


#3

Its the basic slider implementation. Autoplays only on first boot.

<ion-slides   slidesPerView="3" loop="true"  spaceBetween="10" >
    <ion-slide *ngFor="let item of category.companyItems" (click)="modal(item)">
        <div>
            <img  class="detalhesImagem" src="{{item.image_p}}"   />
        </div>
    </ion-slide>
</ion-slides>

#4

The solution I found was to stop the slider on ionViewWillLeave and then starts it again in ionViewDidEnter