Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
57 lines (44 loc) · 2.06 KB

controlled.md

File metadata and controls

57 lines (44 loc) · 2.06 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: