Lesson

Load Data from an Array of ids with Observable.forkJoin in RxJS

A common scenario when loading data is to load an initial array of ids then load each object associated with that id. The result you really want from that scenario is a simple array containing all the loaded objects. Observable.forkJoin allows you to pass in...

Duration
3 min
Access
Free
Transcript
Available

A common scenario when loading data is to load an initial array of ids then load each object associated with that id. The result you really want from that scenario is a simple array containing all the loaded objects. Observable.forkJoin allows you to pass in an Array of Observables (such as Observable.ajax requests) and then forkJoin will wait for each Obeservable to complete then resolve them back into a simple Array for you.