Use Case: In cases where there are multiple HTTP requests and the code needs to wait until the responses from all the HTTP requests are available.
forkJoin waits for each HTTP request to complete and group’s all the observables returned by each HTTP call into a single observable array and finally return that observable array.
forkJoin
The result of a forkJoin is an Observable. The data returned when all of the HTTP request are fullfilled, is an array with elements in the same order as they were presented in the array passed to the forkJoin rxjs library function.
rxjs
References:
https://medium.com/@swarnakishore/performing-multiple-http-requests-in-angular-4-5-with-forkjoin-74f3ac166d61
https://angular.io/guide/rx-library
https://www.npmjs.com/package/rxjs