I want to display images in a list which are fetched from firebase database and firebase storage. Following is my code, when I run it browser got unresponsive. Please help me to fix this.
HTML:
<div class="w3-panel" *ngFor="let item of items;">
<img [src]="getImage(image.imageUrl)"/>
</div>
JS : my.component.ts
// imageUrl = question/1/ch1/image.jpg // sample imageUrl format
getImage(imageUrl){
return new Promise((resolve,reject) =>{
this.storage.ref(imageUrl).getDownloadURL().then(url => {
resolve(url);
})
});
}