Created
December 8, 2016 20:43
-
-
Save ashish173/d0253ba925f466bdc7960874eb642cf3 to your computer and use it in GitHub Desktop.
Manual observable emit value
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
var source = Rx.Observable.create((observer) => { | |
setTimeout(() => { | |
console.log('timeout hit'); | |
observer.onNext('Observable 101'); | |
}, 1000); | |
console.log('observable initialized'); | |
}); | |
source.subscribe(x => console.log(x)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment