linkNgModuleRef
npm Package | @angular/core |
---|---|
Module | import { NgModuleRef } from '@angular/core'; |
Source | core/src/linker/ng_module_factory.ts |
linkOverview
class NgModuleRef<T> {
get injector: Injector
get componentFactoryResolver: ComponentFactoryResolver
get instance: T
destroy(): void
onDestroy(callback: () => void): void
}
linkDescription
Represents an instance of an NgModule created via a NgModuleFactory
.
NgModuleRef
provides access to the NgModule Instance as well other objects related to this
NgModule Instance.
linkMembers
get componentFactoryResolver: ComponentFactoryResolver
The ComponentFactoryResolver to get hold of the ComponentFactories
declared in the entryComponents
property of the module.