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

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

NgModuleRef

Class
stable

Represents an instance of an NgModule created by an NgModuleFactory. Provides access to the NgModule instance and related objects.

On this page

    arrow_upward_alt Back to the top

    API

        
          abstract class NgModuleRef<T> {  abstract readonly injector: EnvironmentInjector;  abstract readonly instance: T;  abstract destroy(): void;  abstract onDestroy(callback: () => void): void;}
        
        

    injector

    EnvironmentInjector

    The injector that contains all of the providers of the NgModule.

    instance

    T

    The NgModule instance.

    destroy

    void

    Destroys the module instance and all of the data structures associated with it.

    @returnsvoid

    onDestroy

    void

    Registers a callback to be executed when the module is destroyed.

    @paramcallback() => void
    @returnsvoid
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page