Skip to content

Instantly share code, notes, and snippets.

@dcyoung-dev
Created May 29, 2019 10:59
Show Gist options
  • Save dcyoung-dev/c2fde9663866358d9cc23f93ddf9aad2 to your computer and use it in GitHub Desktop.
Save dcyoung-dev/c2fde9663866358d9cc23f93ddf9aad2 to your computer and use it in GitHub Desktop.
Angular 8 changes the way in which we lazily load routes from other modules
const routes: Routes = [
{
path: 'old-lazy',
loadChildren: './old-lazy/old-lazy.module#OldLazyModule'
},
{
path: 'new-lazy',
loadChildren: () => import('./new-lazy/new-lazy.module')
.then(m => m.NewLazyModule)
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment