8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfaf450 commit 2b05235Copy full SHA for 2b05235
packages/core/src/linker/ng_module_factory_registration.ts
@@ -44,7 +44,9 @@ export function registerNgModuleType(ngModuleType: NgModuleType): void {
44
const visited = new Set<NgModuleType>();
45
recurse(ngModuleType);
46
function recurse(ngModuleType: NgModuleType): void {
47
- const def = getNgModuleDef(ngModuleType, true);
+ // The imports array of an NgModule must refer to other NgModules,
48
+ // so an error is thrown if no module definition is available.
49
+ const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);
50
const id = def.id;
51
if (id !== null) {
52
const existing = modules.get(id) as NgModuleType | null;
0 commit comments