NgModuleRef
Represents an instance of an NgModule
created by an NgModuleFactory
. Provides access to the NgModule
instance and related objects.
abstract class NgModuleRef<T> {
abstract injector: Injector
abstract componentFactoryResolver: ComponentFactoryResolver
abstract instance: T
abstract destroy(): void
abstract onDestroy(callback: () => void): void
}
属性
属性 | 说明 |
---|---|
abstract injector: Injector | 只读 The injector that contains all of the providers of the |
abstract componentFactoryResolver: ComponentFactoryResolver | 只读 The resolver that can retrieve the component factories declared in the |
abstract instance: T | 只读 The |
方法
Destroys the module instance and all of the data structures associated with it. |
参数没有参数。 返回值
|
Registers a callback to be executed when the module is destroyed. |