Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.97 KB

controlled.md

File metadata and controls

56 lines (43 loc) · 1.97 KB

Rx.Observable.prototype.controlled([enableQueue])

Attaches a controller to the observable sequence with the ability to queue.

Arguments

  1. [enableQueue] (Boolean): Whether to enable queueing. If not specified, defaults to true.

Returns

(Observable): An observable sequence which can be used to request values from the sequence.

Example

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

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

source.request(2);

// => Next: 0
// => Next: 1

Location

File:

Dist:

Prerequisites:

NPM Packages:

NuGet Packages:

Unit Tests: