Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created February 18, 2017 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/62b6dd9bc455be6f14a226f85c3b30e5 to your computer and use it in GitHub Desktop.
Save matthieu-D/62b6dd9bc455be6f14a226f85c3b30e5 to your computer and use it in GitHub Desktop.
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