• Overview
@angular/core

createNgModule

function

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

  
    function createNgModule<T>(  ngModule: Type<T>,  parentInjector?: Injector | undefined): NgModuleRef<T>;
  
  

createNgModule

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

@paramngModuleType<T>

NgModule class.

@paramparentInjectorInjector | undefined

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

@returnsNgModuleRef<T>
Jump to details