[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/core/assertInInjectionContext [Back]  [Original]

assertInInjectionContext Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/core

assertInInjectionContext

function
stable

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

Asserts the context

On this page

    arrow_upward_alt Back to the top

    API

    function assertInInjectionContext(debugFn: Function): void;
    @paramdebugFnFunction

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

    @returnsvoid
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page