Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

71
Vistas
How to download all modules in the background, right after main page load in Angular 14

Making lazy loading per module is pretty easy in Angular.

const routes: Routes = [
  {
    path: 'customers',
    loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule)
  },
  {
    path: 'orders',
    loadChildren: () => import('./orders/orders.module').then(m => m.OrdersModule)
  }
];

But this forces to me to download the module when I navigate to it the first time.

Is it possible to download ALL modules in the background after the first page load?.

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Yes, you can by setting up a preloadingStrategy or you can create your own custom strategy. Angular docs link

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos