Lazy loading modules not working
When using lazy loaded routes, i'm getting this error
Error: Uncaught (in promise): Error: Loading chunk 0 failed.
I have used this and it's working fine except when i'm using the lazy loading like
{path: 'records', loadChildren: './components/records/records.module#RecordsModule', canActivate: [AuthGuardService]}
I thought it is because of {useHash: true}, but after removing this the first part was not working.
Try to use an absolute path instead of relative path.
In your case is something like: loadChildren: 'app/components/records/records.module#RecordsModule'.
@shalomdotnet I've tried this approach also, but getting same error. The only fix is by changing <base href=""> to <base href="./"> But now the problem is that, when i open child window using the approach mentioned i'm getting error
Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'index.html'
Also in some cases this also worked for me
loadChildren: '../components/records/records.module#RecordsModule'
depends on where we call the module from.