Edit: still haven't solved, I'm using angular 9 rc7 btw
Many hours passed and I still don't understand whats wrong, thats my repo where you can check directly - https://github.com/Mautriz/angular-boilerplate/tree/feature/cypress
I have a root router, a lazy-loaded "pages" module, and the pages module has many lazy loaded children
// App
const routes: Routes = [
{
path: "page-not-found",
component: NotFoundComponent
},
{
path: "",
loadChildren: () => import("./pages/pages.module").then(m => m.PagesModule),
data: { preload: true }
},
{
path: "**",
redirectTo: "page-not-found"
}
];
// Pages
const routes: Routes = [
{
path: "",
component: LayoutComponent,
children: [
{
path: "statistics",
loadChildren: () =>
import("./statistics/statistics.module").then(
m => m.StatisticsModule
),
data: { preload: true }
},
{
path: "",
loadChildren: () =>
import("./homepage/homepage.module").then(m => m.HomepageModule),
data: { preload: true }
}
]
}
];
The problem is that if I check chromes request, I can only see the "pages-module" lazily loaded, but can't see the single pages ones (even tho they work)
Why are they not lazily loaded ? Am I missing something? I'm trying to implement a custom strategy and that's preventing me from understanding if it's working or not
EDIT: https://i.sstatic.net/G56zx.png The submodules are not getting generated appearently, and I don't know why
