toObservableSignal
toObservableSignal()
combines the functionality of Angular Signal and RxJS Observable.
This function uses toObservable()
from @angular/core/rxjs-interop
under the hood, so it should be called in an injection context, or the injector
should be passed as the second argument (options).
Usage
toObservableSignal()
accepts a Signal
or WritableSignal
as the first argument.
The second argument is optional - it is a ToObservableOptions
object, which is the exact type used by toObservable()
. Here, you can set the injector.