despensa-app / despensa-web

Despensa-app es una aplicación que te permite gestionar los productos que compras de forma habitual.
https://despensa-app.nmarulo.dev/
MIT License
1 stars 2 forks source link

Add Lazy loading in the routes #3

Open nmarulo opened 1 week ago

nmarulo commented 1 week ago

[!IMPORTANT] Read issue #2 first

Update the file app.router.ts to change the component fields of the routes to loadComponent.

Example:

{
  path: 'shopping-list/:id/add-products',
  loadComponent: () => import('./modules/shopping-list/pages/add-products-shopping-list/add-products-shopping-list.component').then(m => m.AddProductsShoppingListComponent)
}

Reference: Routing and lazy-loading