Ionic3 ion-img不显示带有ng-for的图像 [英] Ionic3 ion-img do not show images with ng-for
本文介绍了Ionic3 ion-img不显示带有ng-for的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用ion-img循环显示动态图像,但是它不起作用.
<ion-item no-lines no-padding *ngFor="let company of shortedDistanceArray">
<div>
<ion-img style="width: 15vh;height: 12vh;" src={{company.images}}"></ion-img>
</div>
</ion-item>
推荐答案
我发现解决方案使用'img'标签而不是'ion-img'
<ion-item no-lines no-padding *ngFor="let company of shortedDistanceArray">
<div>
<img style="width: 15vh;height: 12vh;" src={{company.images}}" />
</div>
</ion-item>
这篇关于Ionic3 ion-img不显示带有ng-for的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文