【发布时间】:2019-03-18 21:45:26
【问题描述】:
就像标题所反映的那样,我发现很难显示我存储在 firebase 上的图像。我在路径之前保存以获得完整的 url 并将其推送到 img 标签中。这是我的想法:
文件.ts:
//imageList contains the url of each image
urlImages : Array<string> = [];
for(let img of this.imageList ) {
this.firestore.ref(img.url).getDownloadURL().then((url) => {
console.log("promise "+url);
this.urlImages.push(url);
});
}
在 file.html 中:
<ion-item-sliding *ngFor='let img of urlImages'>
<img [src]="img" />
</ion-item-sliding>
我是离子和角度环境的初学者...
提前感谢您的帮助。
【问题讨论】:
标签: android angular typescript ionic3