Complete the code to lazy load the AdminModule in Angular routing.
const routes: Routes = [
{ path: 'admin', loadChildren: () => import('./admin/admin.module').[1] }
];catch() or finally() instead of then().load() which is not a function here.Lazy loading uses import() with then() to load the module and return it.
Complete the code to define a route that lazy loads the UserModule.
const routes: Routes = [
{ path: 'user', [1]: () => import('./user/user.module').then(m => m.UserModule) }
];component instead of loadChildren.redirectTo which is for redirects.The loadChildren property is used to lazy load a module in Angular routes.
Fix the error in the lazy loading syntax for the AdminModule route.
const routes: Routes = [
{ path: 'admin', loadChildren: () => import('./admin/admin.module').[1] }
];then().catch() or finally() incorrectly.The import returns a promise, so you must use then() to access the module.
Fill both blanks to create a lazy loaded route for the SettingsModule with path 'settings'.
const routes: Routes = [
{ path: [1], loadChildren: () => import('./settings/settings.module').[2] }
];catch() instead of then().The path should be the string 'settings' and lazy loading uses then(m => m.SettingsModule).
Fill all three blanks to define a lazy loaded route with path 'profile', loading ProfileModule, and adding a route guard 'AuthGuard'.
const routes: Routes = [
{ path: [1], loadChildren: () => import('./profile/profile.module').[2], canActivate: [[3]] }
];then() after import.The path is 'profile', lazy loading uses then(m => m.ProfileModule), and the guard is AuthGuard.