ionic images are not show on load until touch image for fullmodal - ionic3

久未见 提交于 2019-12-16 18:05:15

问题


<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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!