Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49374

IONIC 3 joining two nodes of the firebase and returning a FirebaseListObservable

$
0
0

@VagnerSabadi wrote:

I would like some help from you. I need to fetch an id inside a node in the firebase and use that id to access another node that would fetch a FirebaseListObservable and return to the view. Until then I managed to get these nodes, problem is to transform and return FirebaseListObservable, I really do not know how to do it. I have the following code

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
    })
  })
})

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>