Created
April 26, 2017 05:00
-
-
Save Ibro/4c00925df5f2aadd508f400ad9cdb725 to your computer and use it in GitHub Desktop.
Observable.of - creating Observable from arguments - Coding Blast - www.codingblast.com
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
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