I'm trying to display image in *ngFor which I downloaded from Firebase Storage.
I succeeded fetching image data from storage, but I don't know how to set image data in ngFor statement.
Let me show you my code here.
<ons-list-item class="list__item list__item--chevron" tappable *ngFor="let request of requests | async" (click)="pushToDetail(request)">
<ons-row>
<ons-col width="20%"><img [src]="userProfileImg"></ons-col>
<ons-col style="padding-left:20px;">
<p class="name"><i class="fa fa-venus fa-fw" aria hidden="true"></i>{{request.nickName}}</p>
</ons-col>
</ons-row>
</ons-list-item>
And this is the code to download image. I wrote this one in foreach when I subscribed FirebaseListObservable data.
getProfileImageUrl(userId: string) {
const userStorageRef = firebase.storage().ref().child('images/users/' + userId + "_users.jpg");
userStorageRef.getDownloadURL().then(url => {
this.userProfileImg = url
});
}
Then I'd like you to teach me how to literate images from Firebase Storage. Any suggestions?