of()

Let's look at a very simple creation operator, of(). This takes a variable number of arguments, which will be emitted as values, like so:

let stream$ = Rx.Observable.of(1, 2, 3, 4);
stream$.subscribe( data => console.log(data)) // 1, 2, 3 ,4

The values are fired off immediately. This is very useful when you just want to test things out.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.36.38