MCPcopy
hub / github.com/angular/angular / isInInjectionContext

Function isInInjectionContext

packages/core/src/di/contextual.ts:64–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 * Whether the current stack frame is inside an injection context.
63 */
64export function isInInjectionContext(): boolean {
65 return getInjectImplementation() !== undefined || getCurrentInjector() != null;
66}
67/**
68 * Asserts that the current stack frame is within an [injection
69 * context](guide/di/dependency-injection-context) and has access to `inject`.

Callers 3

constructorMethod · 0.90
constructorMethod · 0.90
assertInInjectionContextFunction · 0.85

Calls 2

getInjectImplementationFunction · 0.90
getCurrentInjectorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…