In 2 nodes firebase ionic


Hello! I present the following doubt that I can not solve! I want to query 2 nodes in a firebase database and return via firebase observable but I’m not getting it! Someone has an idea how to do this. thank you very much


Use AngularFire. Their docs explain exactly how to do that.


We follow the documentation, but we are not making progress. Example of how our code is.
todosUsers: FirebaseListObservable<User[]>;

public busca(userId): any {
this.db.list(/voto/ + userId).subscribe(votos => {
votos.forEach(voto => {
this.db.list(’/users/’ + voto.key).subscribe((users) => {
console.log("->" + users);
this.todosUsers = users;//problem how do i return this.todosUsers


That isn’t consistent with current docs. Among other things, you aren’t providing a generic type to .list.