📜  do and tap operator rxjs - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:03.745000             🧑  作者: Mango

代码示例1
const source = of(1, 2, 3, 4);
source.pipe(
  tap(val => console.log('I am tap: ',val)),
  filter(val =>  val > 2),
  map(val => val + 1)).subscribe((val) => {
  console.log('I am subscriber value after filtering: ', val);
});