K
K
Konstantin2020-04-24 21:15:17
Angular
Konstantin, 2020-04-24 21:15:17

How to subscribe to all observables in Angular?

I have a set of services which I do request on the server. Services are scattered across components.

I need to subscribe to all observables and wait for them to complete.

I know to use the forkJoin operator.

The question is more about architecture - namely, what to do with services - that are already written. How to put together all observables in one place and wait for them to be completed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dasha Tsiklauri, 2020-04-24
@Junart1

You need to subscribe to the isStableobservable located at the applicationRef object
https://angular.io/api/core/ApplicationRef

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question