Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support angular router lazy load module #11

Open
aelbore opened this issue Jul 3, 2018 · 4 comments
Open

Support angular router lazy load module #11

aelbore opened this issue Jul 3, 2018 · 4 comments

Comments

@aelbore
Copy link

aelbore commented Jul 3, 2018

angular lazy load module like loadChildren

const appRoutes: Routes = [
  {
    path: 'subroute1',
    component: Subroute1
  },
  {
    path: 'subroute2',
    component: Subroute2
  },
  {
    path: 'subroute3',
    loadChildren: './subroute3.module#SubRoute3Module'
  }
];
@joeldenning
Copy link
Owner

apologies for the extremely slow response here -- could you explain in more detail what problem you see when you try to use angular router to lazy load modules?

@Jroosterman
Copy link

I believe I am also having a similar problem with single-spa-angular in my own application. When I load an application from another domain and try to lazy load a child module with loadChildren it gives me the error:
Unhandled Promise rejection: Cannot find module './components/details/planner.module' ; Zone: <root> ; Task: Promise.then ; Value: Error: Cannot find module './components/details/planner.module'

@ilnazv
Copy link

ilnazv commented Apr 9, 2019

If you are using Webpack without the Angular CLI you have to add angular-router-loader to the configuration.
https://www.npmjs.com/package/angular-router-loader

@jimyhdolores
Copy link

Were you able to solve this problem? that happens to me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants