hello friends,
I am using slider with dynamic data using property loop and autoplay
<ion-slides *ngIf="slides != null" loop="true"> <!-- autoplay="3000" loop="true" speed="800"-->
<ion-slide *ngFor="let slide of slides; let i = index ;" >
<img [src]="slide.BannerImage" (click)="fnGotoNewArrivalList(i)">
<div class="con-box">
<h2>{{slide.BannerName}}</h2>
</div>
</ion-slide>
</ion-slides>
============================
import { ViewChild } from '@angular/core';
import { Slides } from 'ionic-angular';
@ViewChild(Slides) myslides: Slides;
slideChanged() {
let currentIndex = this.myslides.getActiveIndex();
alert('Current index is ' + currentIndex);
}
fnGotoNewArrivalList(collectionid){
alert(JSON.stringify(collectionid ));
}
Button/Click does not work when going from last slide to first slide
slide next and slide previous both scenario.
NOTE - its working fine without loop property
thank you,