take 取开头的N个值,需要传入数字类型
takeUntil,takeWhile 都是 take的变种
takeUntil 接收的是 Observable 类型,当这个Observable发出值才完成.../lib/rxjs6.3.3.umd.js'>
// https://rxjs-cn.github.io/learn-rxjs-operators/operators...const { filter, take, last, startWith, skip, takeUntil, takeWhile, skipWhile } = rxjs.operators;...takeUntil(timer(5000))
)
// 输出 0,1,2,3
.subscribe(val => console.log(val))...;
const { filter, take, last, startWith, skip, takeUntil, takeWhile, skipWhile, skipUntil } = rxjs.operators