Rx.Observable.prototype.subscribeOnCompleted(onCompleted, [thisArg])

Subscribes a function to invoke upon graceful termination of the observable sequence.

Arguments

  1. onCompleted (Function): Function to invoke upon graceful termination of the observable sequence.
  2. [thisArg] (Any): Object to use as this when executing callback.

Returns

(Disposable): The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.

Example

/* Using functions */
var source = Rx.Observable.range(0, 3);

var subscription = source.subscribeOnCompleted(
  function () {
    console.log('Completed');
  });

// => Completed

/* With a thisArg */
var source = Rx.Observable.range(0, 3);

var subscription = source.subscribeOnCompleted(
  function (err) {
    this.log('Completed');
  }, console);

// => Completed

Location

File:

Dist:

NPM Packages:

NuGet Packages:

Unit Tests:

results matching ""

    No results matching ""