fix(compiler-cli): import routing module with forRoot (#16438)

This commit is contained in:
Adol1111 2017-05-15 15:11:39 -05:00 committed by Jason Aden
parent ea2b24fb4e
commit 1eba623d12
1 changed files with 7 additions and 2 deletions

View File

@ -149,8 +149,13 @@ function _extractLazyRoutesFromStaticModule(
return acc;
}, []);
const importedSymbols = ((moduleMetadata.imports || []) as any[])
.filter(i => i instanceof StaticSymbol) as StaticSymbol[];
const importedSymbols =
((moduleMetadata.imports || []) as any[])
.filter(i => i instanceof StaticSymbol || i.ngModule instanceof StaticSymbol)
.map(i => {
if (i instanceof StaticSymbol) return i;
return i.ngModule;
}) as StaticSymbol[];
return importedSymbols
.reduce(