How to wait for multiple interfaces to return in anular(rxjs)?

Issue

When I use Angualr’s HttpClient(rxjs) request , I need to wait for multiple interfaces to return before rendering the page. What should I do? Similar to Promise.all

Solution

Get each httpClient.get call as an observable, then all of them will have completed when forkJoin(o1$, o2$, o3$) emits a three-element array of their respective responses.

Answered By – JSmart523

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published