Lazy routes not working #743

Closed
opened 2025-08-09 17:17:30 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @clintsinger on 5/19/2017

I have a project based off of the Angular 2 dotnet new SpaTemplate where I had a router which used a number of lazy loaded modules. I then used the generator-aspnetcore-spa to create a version sample compatible with Angular 4. I then used the Angular 4 version as the template for upgrading my Angular 2 project.

Now that I have changed over to Angular 4 my lazy loaded routes aren't working anymore. I get a message in the browser about the module not being found. The routes themselves haven't changed from the V2 version.

I also added a simple lazy loaded module to the plain yeoman version and it behaves the same way so it definitely appears to be something about the new version - either the routing logic changed or webpack isn't doing its thing, etc.

*Originally created by @clintsinger on 5/19/2017* I have a project based off of the Angular 2 `dotnet new SpaTemplate` where I had a router which used a number of lazy loaded modules. I then used the `generator-aspnetcore-spa` to create a version sample compatible with Angular 4. I then used the Angular 4 version as the template for upgrading my Angular 2 project. Now that I have changed over to Angular 4 my lazy loaded routes aren't working anymore. I get a message in the browser about the module not being found. The routes themselves haven't changed from the V2 version. I also added a simple lazy loaded module to the plain yeoman version and it behaves the same way so it definitely appears to be something about the new version - either the routing logic changed or webpack isn't doing its thing, etc.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#743
No description provided.