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

Answer Checked By – Jay B. (AngularFixing Admin)

Leave a Reply

Your email address will not be published.