• Overview
@angular/core

NgModuleRef

Class

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

  
    abstract class NgModuleRef<T> {}
  
  

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

componentFactoryResolver

@deprecated

Angular no longer requires Component factories. Please use other APIs where Component class can be used directly.

The resolver that can retrieve component factories in a context of this module.

Note: since v13, dynamic component creation via ViewContainerRef.createComponent does not require resolving component factory: component class can be used directly.

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