MCPcopy
hub / github.com/angular/angular / createModule

Function createModule

packages/core/test/linker/ng_module_integration_spec.ts:125–129  ·  view source on GitHub ↗
(moduleType: Type<T>, parentInjector?: Injector | null)

Source from the content-addressed store, hash-verified

123 }
124
125 function createModule<T>(moduleType: Type<T>, parentInjector?: Injector | null): NgModuleRef<T> {
126 // Read the `ngModuleDef` to cause it to be compiled and any errors thrown.
127 getNgModuleDef(moduleType);
128 return createModuleFactory(moduleType).create(parentInjector || null);
129 }
130
131 function createComp<T>(compType: Type<T>, moduleType: Type<any>): ComponentFixture<T> {
132 const componentDef = (compType as any).ɵcmp;

Callers 3

createCompFunction · 0.70
createInjectorFunction · 0.70

Calls 3

getNgModuleDefFunction · 0.90
createModuleFactoryFunction · 0.85
createMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…