Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { interval, merge} = Rx;
- const { take, map, tap, share } = RxOperators;
- console.log('hello')
- let source = interval(1000).pipe(
- tap(()=>console.log('processing data')),
- take(4),
- share()
- )
- let temp1 = 'stream : 1'
- let s1$ =source.pipe(
- tap(()=> console.log(temp1)),
- map(()=> temp1)
- );
- let temp2 = 'stream : 2'
- let s2$ = source.pipe(
- tap(()=> console.log(temp2)),
- map(()=> temp2)
- );
- merge(s1$, s2$)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement