Skip to content

Instantly share code, notes, and snippets.

Last active Apr 26, 2017
What would you like to do?
Implementing simple observer for observable - Coding Blast -
import { Observable, Observer } from 'rxjs';
let words = ['coding blast', 'coding', 'blast'];
let source = Observable.from(words);
class SimpleObserver implements Observer<string> {
next(value: string) {
console.log('next: ', value);
error(err: any) {
console.log('error: ', err);
complete() {
let observer = new SimpleObserver();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment