Created
November 25, 2017 14:09
-
-
Save rarmatei/33b377906d9831f40c7d3314293aebcc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class MyService { | |
constructor() { | |
this._producer = Rx.Observable.of(1) | |
.publish(); | |
} | |
private _producer: Rx.ConnectableObservable<number>; | |
startItUp(): Rx.Observable<number> { | |
this._producer.connect(); | |
return this._producer; | |
} | |
get passiveValues(): Rx.Observable<string> { | |
return this._producer.mapTo("got value"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment