Hi,
I have the image file name stored on database. How can I retrieve the corresponding url and disply it?
home.ts
var query = firebase.database().ref("photos/" + uidd).orderByKey();
query.once("value")
.then(function(snapshot) {
snapshot.forEach(function(childSnapshot) {
var url = childSnapshot.val().txt;
console.log('url');
console.log(url);
var webUrl = firebase.storage().ref(url);
webUrl.getDownloadURL().then(function(url) {
console.log('webUrl');
console.log(webUrl.fullPath);
imageUrls.push(url);
console.log('imageUrls');
console.log(imageUrls);
home.html
<ion-grid>
<ion-row>
<ion-col col-12 col-sm-4 col-md-3 col-lg-2 *ngFor="let image of imageUrls">
<img [src]="image" style="width:128px;height:128px;"/>
</ion-col>
</ion-row>
</ion-grid>
What is wrong?