• Overview
@angular/core/rxjs-interop

toObservable

function

Exposes the value of an Angular Signal as an RxJS Observable.

API

  
    function toObservable<T>(  source: Signal<T>,  options?: ToObservableOptions | undefined): Observable<T>;
  
  

toObservable

Observable<T>

Exposes the value of an Angular Signal as an RxJS Observable.

The signal's value will be propagated into the Observable's subscribers using an effect.

toObservable must be called in an injection context unless an injector is provided via options.

@paramsourceSignal<T>
@paramoptionsToObservableOptions | undefined
@returnsObservable<T>

Description

Exposes the value of an Angular Signal as an RxJS Observable.

The signal's value will be propagated into the Observable's subscribers using an effect.

toObservable must be called in an injection context unless an injector is provided via options.

Jump to details