W3cubDocs

/Angular

createNgModuleRef

function

Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.

createNgModuleRef<T>(ngModule: Type<T>, parentInjector?: Injector): viewEngine_NgModuleRef<T>

Parameters
ngModule Type

NgModule class.

parentInjector Injector

Optional injector instance to use as a parent for the module injector. If not provided, NullInjector will be used instead.

Optional. Default is undefined.

Returns

viewEngine_NgModuleRef<T>

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/createNgModuleRef