Skip to content

Commit

Permalink
fix(compiler-cli): import routing module with forRoot (#16438)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adol1111 authored and jasonaden committed May 17, 2017
1 parent a5bdbed commit b7f8581
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/compiler-cli/src/ngtools_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b7f8581

Please sign in to comment.