I created the following function:
retrieveLikedProperties(): AngularFirestoreCollection<any> {
return this.afs.collection('users', ref =>
ref.where('uid', '==', this._auth.currentUserId)
.where('likedProp', '==', true)
);
}
When attempting to call it, I used the following method:
ngOnInit() {
this._property.retrieveLikedProperties().subscribe(likedProp => {
console.log(likedProp);
this.likedProp = likedProp;
});
}
Unfortunately, I encountered an error stating:
ERROR TypeError: this._property.retrieveLikedProperties is not a function
Does anyone have insights on why this is happening, and how to correctly call this function?