Guys i have an angular application with lazy loading enabled and below modules.
CoreModule, (import in app module)
SharedModule, (imported in each module)
ProjectsModule,
AuthModule
And this is my app routing module:
{ path: "", redirectTo: "auth/sign-in", pathMatch: "full" },
// { path: "auth", loadChildren: () => AuthModule }, // Bundled in main js file
{ path: "auth", loadChildren: () => import("@core/auth/auth.module").then(p => p.AuthModule) },
{ path: "projects", loadChildren: () => import("@projects/projects.module").then(p => p.ProjectsModule) }
when using dynamic import syntax in root app routing module the javascript bundles fetched in browser are below ones: (refreshing /auth/sign-in)
- core-auth-auth-module.js
- default~core-auth-auth-module~projects-projects-module.js
- projects-projects-module.js (Preloading)
1- So what exactly are modules 1 and 2?
Then when i'm using function syntax on loadchildren first 2 modules don't get load in browser.
2- What's the difference?