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?.
Yes, you can by setting up a preloadingStrategy
or you can create your own
custom strategy.
Angular docs link