问题
<ion-content>
<ion-slides class="image-slider" loop="false" slidesPerView="1">
<ion-slide *ngFor="let item of imageList">
<ion-thumbnail>
<ion-img [src]="item" class="thumb-img" (click)="presentModal(item)"></ion-img>
</ion-thumbnail>
</ion-slide>
</ion-slides>
</ion-content>
I got a very strange problem.
How to fix it? after touch image for fullmodal image to show
回答1:
ion-img is used to cache images when virtualScroll is being used. It is not an independent component. Since there is no virtualScroll in the given code, you should be using html img tag.
Use img.
<img [src]="item" class="thumb-img" (click)="presentModal(item)"/>
Refer: documentation
来源:https://stackoverflow.com/questions/48259425/ionic-images-are-not-show-on-load-until-touch-image-for-fullmodal-ionic3