【发布时间】:2021-11-01 22:27:33
【问题描述】:
我有以下伪代码
zip(
...[1, 2, 3].map((id) =>
this.http.function1(id).pipe(
mergeMap((obj1) => this.http.function2(obj1.id)),
mergeMap((obj2) => this.http.function3(obj2.id)),
),
),
).subscribe((result) => {
console.log('This should be an array of all the results of the requests to this.http.function3');
});
我想把所有请求的结果放在一起。我该怎么做?
【问题讨论】:
标签: angular rxjs rxjs-observables