Ion slides do not update with dynamic content

<ion-slides *ngIf="images !== undefined || images.length !== 0">
        <ion-slide *ngFor="let image of images; let i = index">
          <div class="img-wrap">
            <ion-img [src]="image"></ion-img>
          </div>
        </ion-slide>
      </ion-slides>

I have also tried the below code.
this.slides.getActiveIndex().then(index => {
let realIndex = index;
console.log(’ ggggggg ', event.target.swiper.isEnd);

  if (event.target.swiper.isEnd) {  // Added this code because getActiveIndex returns wrong index for last slide

    realIndex = this.slidesList.length - 1;
    console.log('ionSlideTouchEnd --- ', realIndex);
    this.slides.slideTo(realIndex);
    console.log('ionSlideTouchEnd ##### ', realIndex);
  }
  // You can now use real index 
}).catch((error) => {
  console.log(' ggggggg error ', error);

});

But getActiveIndex and isEnd Does not return anything. I am using this as a component. Please suggest.

Thanks
Alok Gupta

https://angular.io/api/core/NgZone
use ngZone for instant update

this.ngZone.run(()=>{
(Your code here)
});

I think you have to use getActiveIndex() using async/await pattern.
async ionChange() {
await this.swiper.getActiveIndex().then( idx => {
…do what you want.
});
}