I am trying to retrieve data from firebase and display them.
But I kept getting that error.
my part of code is like this:
-firebase service file-
profileData: FirebaseObjectObservable<Profile[]>;
getProfile() {
return this.profileData = this.afDatabase.object(’/profile/’);
}
-homepage ts file-
profiles: FirebaseObjectObservable<Profile[]>;
ionViewWillLoad() {
this.profiles = this.firebaseService.getProfile();
console.log(‘ionViewDidLoad HomePage’);
}
-homepage template-
<ion-item *ngFor="let profile of profiles | async " >
{{profile.username }} - {{profile.category }} - {{profile.goal}} - {{profile.level}}
I looked up several similar problems discussed here but
I can’t solve mine following their solutions.
I am working on this problem several days.
Please help me.
Thanks.