runInInjectionContext
function
Runs the given function in the context of the given
Injector
.
API
Description
function runInInjectionContext<ReturnT>( injector: Injector, fn: () => ReturnT): ReturnT;
runInInjectionContext
ReturnT
Runs the given function in the context of the given
Injector
.
Within the function's stack frame, inject
can be used to inject dependencies
from the given Injector
. Note that inject
is only usable synchronously, and cannot be used in
any asynchronous callbacks or after any await
points.
@paramfn
() => ReturnT
the closure to be run in the context of injector
@returns
ReturnT
Jump to details