To prevent this with Observable-wrapped requests we can use concatMap operator.
merge(observable1, observable2,…) — subscribes to every argument observable and re-emits values from all of them.
forkJoin(observable1, observable2,…)— analog for Promise.all — waits till all Observables are complete and then emits an array of last v…
observable1.pipe(withLatestFrom(observable2) — on each value from observable1 also provide last emitted value for observable1 (result: [value_ob…
combineLatest(observable1, observable2,…) — waits for any of observable to emit and provide array of last emitted values from all observables …
Promise.race — wait till one of the Promises is resolved and return that result.
#4 A small number of Promises combination tools. Observables provide a wide variety of operators for that.
While same code Observables will be much shorter:
#3 No built-in retry or repeat logic for Promises. ‘repeat’ and ‘retry’ operators for Observables.