Search code examples
angulartypescriptlazy-loadingangular7

Could not resolve module ' ' relative to ' ' Angular 7


I am new to angular 7 and have trying to implement lazy loading. After did all the things I got the above issue .

Error :

Could not resolve module ./Modules/itemmaster/itemmaster.module relative to app\Modules\initialRouting.ts

Folder Structure : enter image description here

And :

  {path:'Item Master',  loadChildren:'./Modules/itemmaster/itemmaster.module#ItemMaster'}

Can anyone help me to fix this issue .

Path Of InitialRouting.ts

enter image description here


Solution

  • try this (remove /Modules path)

    {path:'ItemMaster',  loadChildren:'./itemmaster/itemmaster.module#ItemMasterModule'}