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
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
I'm trying to add a module using a lazy load implementation (learning this) but the Angular documented approach does not work despite the syntax being correct. I'm uncertain if this is (maybe) not supported by the SPATemplates?
The error is the following: ERROR Error: Uncaught (in promise): Error: Cannot find module 'app/user/user.module'. webpackEmptyContext@http://localhost:3258
The user.module is referenced here in the app.module: { path: 'user', loadChildren:'app/user/user.module#UsersModule'},
however, this doesn't work even when trying different path strings.
The workaround for this is to modify the navigation link in the navbar.component.html file to the following: <a [routerLink]="['/profile']" routerLinkActive="active">Welcome User</a>
Whereas before it was the following: <a [routerLink]="['/user/profile']" routerLinkActive="active">Welcome User</a>
and then removing the path with the loadChildren syntax and adding the UserModule as shown in the app.module.shared.ts file
Is this is expected behavior when using modules other than the app.module?