I have the following code:
//Subscription 3: role ID to role Name
af.database.object('/roles/'+businessRole.$value)
.subscribe((roleData) => {
//Subscription 4: Get user info
af.database.object('/users/'+businessRole.$key).subscribe(user => {
Which contains a subscription inside a subscription.
The problem here is that the app waiting for the first one before running the second one. I want to execute both of them in one time, and get the result of each. How I can do that?
I've been using Promise.All()
before but:
- I would love to know how I can do that with rxjs
- I couldn't find a way to get the result of each observable using
Promise.All()
Thanks