NgModuleRef
NgModule 创建的 NgModuleFactory 的实例。提供对 NgModule 实例和相关对象的访问。
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 | 只读 |
abstract componentFactoryResolver: ComponentFactoryResolver | 只读 此解析器可以检索本模块的 The resolver that can retrieve the component factories declared in the |
abstract instance: T | 只读 |
方法
销毁模块实例以及与其关联的所有数据结构。 Destroys the module instance and all of the data structures associated with it. |
参数没有参数。 返回值
|
注册一个销毁模块时要执行的回调。 Registers a callback to be executed when the module is destroyed. |