非同期操作:forkJoin

    forkJoin(
      this.http.get('/hadoopbi/celebrity_details?celebrity_id=' + this.userId),
      this.http.get('/hadoopbi/celebrity_prod?celebrity_id=' + this.userId),
      this.http.get('/hadoopbi/celebrity_data?celebrity_id=' + this.userId)
    )
    .subscribe(([res1, res2, res3]) => {
      // 有序结果
    });

関数の署名: forkJoin(...args, selector : function): Observable

すべてのオブザーバブルが完了したら、各オブザーバブルの最新の値を出力します

おすすめ

転載: blog.csdn.net/u013475983/article/details/98610988