I am working on checking the existence of a Firebase list using AngularFire2 in Angular.
Below is my parent list:
https://i.sstatic.net/gSjEb.jpg
I specifically need to verify if the child element Messages exists within this list.
This is the code snippet I have so far:
checkChild(){
let usersRef = this.db.list(`/Users/${this.authData.afAuth.auth.currentUser.uid}/`);
}
While attempting to implement methods like userRef.child('Messages')
and userReflistChild('Messages')
, I encountered an error stating that the latter method does not exist.
I am looking for a new approach or best practice recommended by Firebase, aiming to avoid the use of the subscribe method. While I know I can achieve it through the map method, I am open to exploring alternative solutions.