What is the RxJs equivalent of Promise.all() whereby the then block only executes when all promises are resolved?
const request1 = this.http.get('/api/hello').toPromise() // returns a promise
const request2 = this.http.get('/api/there').toPromise() // returns a promise
Promise.all([request1, request2]).then(([response1, response2]) => {
// executes if/when ALL the promises resolve
console.log('response1', response1);
console.log('response2', response2);
}).catch(err => {
// executes if ANY ONE of the promises fail / reject
console.log('err', err);
})
So what is the equivalent approach in RxJs? thanks