Hello,
can anyone tell me why the interpolation of the index property doesn’t work? the value remains fixed at 1.
.html
<swiper (slideChange)="onSlideChange($event)">
<ng-template *ngFor = "let image of this.images, let i = index" swiperSlide>
<ion-list style="align-items:center">
<ion-img class="image" [src]="image.data"></ion-img>
<ion-label>{{image.name}}</ion-label>
</ion-list>
</ng-template>
</swiper>
<ion-label>{{index}}/{{this.images.length}}</ion-label>
.ts
images = [....];
index = 1;
onSlideChange(event){
this.index = event[0].activeIndex+1;
console.log(this.index);
}
p.s the console prints the correct index value every (slideChange)
1 post - 1 participant