Last active
May 13, 2017 03:08
-
-
Save Ibro/d6f364c6636960a7d76fb0abc6e3f207 to your computer and use it in GitHub Desktop.
RxJS - Hot Observable - Coding Blast - www.codingblast.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Observable} from 'rxjs'; | |
let source = Observable | |
.interval(1000) | |
.take(6) | |
.publish() | |
.refCount(); | |
setTimeout(function () { | |
source.subscribe(x => console.log('sub 1: ', x)); | |
}, 2700); | |
setTimeout(function () { | |
source.subscribe(x => console.log(' sub 2: ', x)); | |
}, 4100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment