Created
November 24, 2016 15:13
-
-
Save ashish173/2351cfa639fbbb508a3f91af06af3366 to your computer and use it in GitHub Desktop.
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
console.clear(); | |
var source = Rx.Observable.create(observer => { | |
Rx.Observable.range(0,5).subscribe( | |
data => { | |
console.log(data) | |
if(data > 2) { | |
// conveys to the subscriber of source | |
// that values has changed | |
observer.next("greater than 2"); | |
} | |
} | |
) | |
}) | |
source.subscribe( | |
data => console.log(data) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment