Created
February 18, 2017 21:34
-
-
Save matthieu-D/62b6dd9bc455be6f14a226f85c3b30e5 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
ngOnInit() { | |
this.observable = new Observable((observer: Observer<string>) => { | |
this.observer = observer; | |
}); | |
this.observable.subscribe(this.handleData, this.handleError , this.handleComplete); | |
this.observer.next('12'); | |
this.observer.next('15'); | |
this.observer.complete(); | |
this.observer.next('16'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment