The Wayback Machine - https://web.archive.org/web/20250915151052/https://angular.dev/api/core/assertInInjectionContext
    • Overview
@angular/core

assertInInjectionContext

function
stable

Asserts that the current stack frame is within an injection context and has access to inject.

API

function assertInInjectionContext(debugFn: Function): void;

assertInInjectionContext

void

Asserts that the current stack frame is within an injection context and has access to inject.

@paramdebugFnFunction

a reference to the function making the assertion (used for the error message).

@returnsvoid
Jump to details
HTTPS · web.archive.org
← Home