We already learned how we can create an observable containing all data from the other observables, but we can also use some other operators to combine this data or choose between them instead of just propagating everything.
Combining observables
Using the forkJoin() operator
This operator lets you run multiple observables in parallel and propagates the last elements of each one, so this operator is perfect for implementing flow control for promises or callback operations in JavaScript, as we already discussed in this chapter.
This operator has the following signature:
Rx.Observable.forkJoin(observables);
This is a class() method instead of an instance() method, and it receives an arbitrary number of arguments and the last is optional:
- observables: An...