Rx.Observable.prototype.ignoreElements()

Ignores all elements in an observable sequence leaving only the termination messages.

Returns

(Observable): An empty observable sequence that signals termination, successful or exceptional, of the source sequence.

Example

var source = Rx.Observable.range(0, 10)
    .ignoreElements();

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Completed

Location

File:

Dist:

NPM Packages:

NuGet Packages:

Unit Tests:

results matching ""

    No results matching ""