How to ‘wait’ for two observables in RxJS
Last Update: Mar, 2022. RxJS v7: combineLatestWith From reactiveX documentation: Whenever any input Observable emits a value, it computes a formula using the latest values from all the inputs, then emits the output of that formula. // Observables to combine const name$ = this._personService.getName(id); const document$ = this._documentService.getDocument(); name$.pipe( combineLatestWith($document) ) .subscribe(([name, document]) => { … Read more