You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got an error after upgrading my project to latest version, the nested lazyloaded modules seems to be broken Cannot find 'SubModule' in './sub/sub.module'
Expected behavior
Nested lazyloaded modules should work and successfully load the next chunk
Minimal reproduction of the problem with instructions
create a lazyloaded module for example called "MainModule".
create another lazyloaded module inside your first module "SubModule" and call it by { path: 'sub', loadChildren: './sub/sub.module#SubModule' }
inside the main routes of the main module
Environment
- generator version: 5.0.0
- node version: 9.0.0 <!-- run `node --version` -->
- npm version: 5.5.1 <!-- run `npm --version` -->
- OS: All
Others:
The compiler displays no error and the file is loaded without problems, only when you try to load the chunk on the browser you receive this error
It was working on version 4x.
The text was updated successfully, but these errors were encountered:
After diving into this problem i found that it is not a lazyload issue, the issue because in angular 6 they removed the global var, i do not know why it is showing a wrong error but in order to fix this just switch to window or declare global in polyfills.ts file as described here angular/angular-cli#8160 (comment)
Uh oh!
There was an error while loading. Please reload this page.
I'm submitting a...
Current behavior
i got an error after upgrading my project to latest version, the nested lazyloaded modules seems to be broken
Cannot find 'SubModule' in './sub/sub.module'
Expected behavior
Nested lazyloaded modules should work and successfully load the next chunk
Minimal reproduction of the problem with instructions
create a lazyloaded module for example called "MainModule".
create another lazyloaded module inside your first module "SubModule" and call it by
{ path: 'sub', loadChildren: './sub/sub.module#SubModule' }
inside the main routes of the main module
Environment
Others:
The compiler displays no error and the file is loaded without problems, only when you try to load the chunk on the browser you receive this error
It was working on version 4x.
The text was updated successfully, but these errors were encountered: