How to unsubscribe from an Observable returned by forkJoin?

前端 未结 2 1677
抹茶落季
抹茶落季 2021-02-19 06:58

In my Angular2-typescript app, I\'m using forkJoin to return an Observable only once all the parallel HTTP calls were made.

Issue: the subscription call

2条回答
  •  天涯浪人
    2021-02-19 07:24

    As forkJoin reference says, it

    Runs all observable sequences in parallel and collect their last elements.

    This means that the operator gets values from completed observables and returns a completed observable with single value. There's no need to unsubscribe from it.

提交回复
热议问题