Lazy loaded module in named outlet throws error
See original GitHub issue[x] bug report [ ] feature request [ ] support request
Current behavior Navigating to route with lazy loaded module in named outlet throws error:
Uncaught (in promise): TypeError: Cannot read property ‘routes’ of undefined
Expected behavior Navigating to route with lazy loaded module in named outlet without errors.
Minimal reproduction of the problem with instructions When I have configured my routes with named outlet and want to have lazy loaded module in that outlet.
export const routes: Routes = [
{
path: '',
component: AppComponent,
children: [
{
path: '',
loadChildren: "app/home/home.module#HomeModule"
}, {
path: '',
loadChildren: "app/about/about.module#AboutModule",
outlet: "about"
}
]
}
];
Here is the plnkr to demonstrate the behavior: http://plnkr.co/edit/nK9kJYdakXILZU0UKFrP?p=preview (Anything is displayed because of error)
What is the motivation / use case for changing the behavior? Using lazy loaded modules in named outlets.
Please tell us about your environment:
Angular version: 2.0.X
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
Node (for AoT issues): node --version =
Issue Analytics
- State:
- Created 7 years ago
- Reactions:120
- Comments:58 (12 by maintainers)

Top Related StackOverflow Question
We have this
Where proxy route component is simply
Though I don’t want to speak on behalf of the Angular team, I feel like something needs to be said here:
This issue doesn’t get closer to resolution in proportion to the number of comments that say “Any update on this”/“Any fix for this”/etc. Thumbs-upping those comments doesn’t magically go into some petition for the Angular team to finish this.
If you’re stuck, read the thread – there’s a workaround, which as the name suggests, will get you working. If you’d like to get updates on this, save some keystrokes by clicking the ‘Subscribe’ button – that allows you to receive updates in your email. You’ll also receive updates every time someone comments “Any update on this?”, so please, don’t be that person.
Better yet, be the change you want to see in the world and submit a pull request.