defer
signature: defer(observableFactory: function(): SubscribableOrPromise): Observable
defer(observableFactory: function(): SubscribableOrPromise): Observable
Create an observable with given subscription function.
💡 defer
is used as part of the iif
operator!
Examples
Example 1: Defer to get current date/time at the time of subscription
( StackBlitz )
Related Recipes
Additional Resources
defer 📰 - Official docs
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/defer.ts
Last updated