toPromise
Converts an existing observable sequence to an ES6 Compatible Promise.
Arguments
promiseCtor
(Function
): The constructor of the promise. If not provided, it looks for it in Rx.config.Promise.
Returns
(Promise
): An ES6 compatible promise with the last value from the observable sequence.
Example
Example with config
Last updated
Was this helpful?