W3cubDocs

/Angular

createNgModule

function

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

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

Parameters
ngModule Type<T>

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>: NgModuleRef that represents an NgModule instance.

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