RxJS 1 array item into sequence of single items - operator

前端 未结 5 624
一向
一向 2021-01-11 10:40

Given such observable

Rx.Observable.of([1,2,3,4,5])

which emits a single item (that is an array), what is the operator

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-11 11:23

    You can use from now to convert an array into a sequence.

    https://www.learnrxjs.io/operators/creation/from.html

    from([4,5,6])

提交回复
热议问题