> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/observable/observable_methods/defer.md).

# defer

![defer](http://reactivex.io/documentation/operators/images/defer.png)

Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.

## Arguments

1. `observableFactory` *(`Function`)*: Observable factory function to invoke for each observer that subscribes to the resulting sequence.

## Returns

*(`Observable`)*: An observable sequence whose observers trigger an invocation of the given observable factory function.

## Example
