My folder structure is:
+-- app.module.ts
+-- app.routing.ts
+-- app.component.ts
+-- account/
| +-- account.module.ts
| +-- account.routing.ts
| +-- account.component.ts
In my app.routing.ts I have,
{ path: 'account', loadChildren: './account/account.module#AccountModule' },
And, in account.routing.ts, I have,
{ path: 'login', component: LoginFormComponent}
but when I enter page/account/login I get the following error:
NodeInvocationException: Uncaught (in promise): Error: Cannot find module './account/account.module'. Error: Cannot find module './account/account.module'.
I've tried changing ./account/account.module#AccountModule to app/account/account.module#AccountModule, same error.
Any thoughts? Thanks in advance.
/app/account/account.module#AccountModule
? Relative paths in Angular causes strange unexpected results all the freaking time.