web-dave / ng-essential-workshop

0 stars 0 forks source link

Lazy loading #9

Open web-dave opened 3 years ago

web-dave commented 3 years ago
web-dave commented 3 years ago

fleet-routing.module.ts

const routes: Routes = [
  {
    path: '',
    component: FleetComponent,
    children: [{
      path: '',
      component: ListComponent
    }]
  }
];
web-dave commented 3 years ago

app-routing.module.ts

const routes: Routes = [
  {
    path: 'fleet',
    loadChildren: () => import('./fleet/fleet.module').then(m => m.FleetModule)
  },
  ...
];
web-dave commented 3 years ago

NEXT