Reputation: 247
I have two tables in firebase. First table called friend_list and contain the information about current user friends (their uid's). users table consist of users display Name, email address and photo URL.
users
--- (uid)
--- displayName
--- email
--- photoURL
How can I retrieve information from users table, with specific user ids? Currently I have two friends in a friendlist. Sorry I'm very newbie in firebase.
Upvotes: 0
Views: 285
Reputation: 4292
you can Get the object from firebase database
in constructor add public af: AngularFire,
in function
let uid="xxxx" // here is your user id
let item = this.af.object('/users/' + uid, { preserveSnapshot: true });
item.subscribe(snapshot => {
console.log(snapshot.val())
this.userDetails= snapshot.val();
});
Upvotes: 1