Rx.AsyncSubject
Represents the result of an asynchronous operation. The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
This class inherits both from the Rx.Observable
and Rx.Observer
classes.
Usage ##
The follow example shows caching on the last value produced when followed by an onCompleted notification which makes it available to all subscribers.
Location
rx.js
AsyncSubject Constructor
##
AsyncSubject Constructor
##AsyncSubject Instance Methods
##
AsyncSubject Instance Methods
##Inherited Classes ##
AsyncSubject Constructor ##
Rx.AsyncSubject()
Rx.AsyncSubject()
Creates a subject that can only receive one value and that value is cached for all future observations.
Example
Location
rx.js
AsyncSubject Instance Methods ##
Rx.AsyncSubject.prototype.dispose()
Rx.AsyncSubject.prototype.dispose()
Unsubscribe all observers and release resources.
Example
Location
rx.js
Rx.AsyncSubject.prototype.hasObservers()
Rx.AsyncSubject.prototype.hasObservers()
Indicates whether the subject has observers subscribed to it.
Returns
(Boolean): Returns true
if the AsyncSubject has observers, else false
.
Example
Location
rx.js
Last updated
Was this helpful?