I have configured my lazy loaded Home module to have an empty path. However, the issue I am facing is that whenever I try to load different modules such as login using its URL like /new/auth, the home module also gets loaded along with it.
const routes: Routes = [
{
path: '', component: MainLayoutComponent,
children: [
{
path: '',
loadChildren: './homepage/homepage.module#HomepageModule'
},
{
path: 'new/auth',
loadChildren: './auth/auth.module#AuthModule'
},
}
}
Even though I made my home page module lazy loaded, I expect it to only load on the empty path. But it is loading with every route.
I have checked extensively in my app module and other root modules, and there is no import of the home module present.