(moduleType: Type<any>, ngModule: NgModule = {})
| 103 | * This function automatically gets called when a class has a `@NgModule` decorator. |
| 104 | */ |
| 105 | export function compileNgModule(moduleType: Type<any>, ngModule: NgModule = {}): void { |
| 106 | patchModuleCompilation(); |
| 107 | compileNgModuleDefs(moduleType as NgModuleType, ngModule); |
| 108 | if (ngModule.id !== undefined) { |
| 109 | registerNgModuleType(moduleType as NgModuleType, ngModule.id); |
| 110 | } |
| 111 | |
| 112 | // Because we don't know if all declarations have resolved yet at the moment the |
| 113 | // NgModule decorator is executing, we're enqueueing the setting of module scope |
| 114 | // on its declarations to be run at a later time when all declarations for the module, |
| 115 | // including forward refs, have resolved. |
| 116 | enqueueModuleForDelayedScoping(moduleType, ngModule); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class. |
no test coverage detected
searching dependent graphs…