Created
April 26, 2017 04:53
-
-
Save devmobasa/9166b18960cc1570336844aae6a5ebd3 to your computer and use it in GitHub Desktop.
Observable.of - creating observable - Coding Blast - www.codingblast.com
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
| import {Observable} from 'rxjs'; | |
| let source = Observable | |
| .of('coding blast', 'badword', 'coding', 'blast') | |
| .map(w => w + ' RxJS'); | |
| console.log('before subscribe'); | |
| source.subscribe(function next(value) { | |
| console.log('Subscriber - next: ', value); | |
| }, | |
| function error(err) { | |
| console.log('Subscriber - error: ', err); | |
| }, | |
| function complete() { | |
| console.log('Subscriber - complete'); | |
| }); | |
| console.log('after subscribe'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment