1- ### ` Rx.Observable.prototype.subscribe([observer] | [onNext], [onError], [onCompleted], [thisArg] ) `
2- ### ` Rx.Observable.prototype.forEach([observer] | [onNext], [onError], [onCompleted], [thisArg] ) `
1+ ### ` Rx.Observable.prototype.subscribe([observer] | [onNext], [onError], [onCompleted]) `
2+ ### ` Rx.Observable.prototype.forEach([observer] | [onNext], [onError], [onCompleted]) `
33[ Ⓢ ; ] ( https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js " View in source ")
44
55Subscribes an observer to the observable sequence.
@@ -9,7 +9,6 @@ Subscribes an observer to the observable sequence.
991 . ` [onNext] ` * (` Function ` )* : Function to invoke for each element in the observable sequence.
10102 . ` [onError] ` * (` Function ` )* : Function to invoke upon exceptional termination of the observable sequence.
11113 . ` [onCompleted] ` * (` Function ` )* : Function to invoke upon graceful termination of the observable sequence.
12- 4 . ` [thisArg] ` * (` Any ` )* : Object to use as this when executing callback.
1312
1413#### Returns
1514* (Disposable)* : The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
@@ -60,24 +59,6 @@ var subscription = source.subscribe(
6059 console .log (' Completed' );
6160 });
6261
63- // => Next: 0
64- // => Next: 1
65- // => Next: 2
66-
67- /* With a thisArg */
68- var source = Rx .Observable .range (0 , 3 )
69-
70- var subscription = source .subscribe (
71- function (x ) {
72- this .log (' Next: %s' , x);
73- },
74- function (err ) {
75- this .log (' Error: %s' , err);
76- },
77- function () {
78- this .log (' Completed' );
79- }, console );
80-
8162// => Next: 0
8263// => Next: 1
8364// => Next: 2
0 commit comments