Skip to content

Commit 172f74a

Browse files
committed
refactor: lazy loading via dynamic import()
1 parent dac577d commit 172f74a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/app/app.routing.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,35 @@ export const routes: Routes = [
5252
children: [
5353
{
5454
path: 'base',
55-
loadChildren: './views/base/base.module#BaseModule'
55+
loadChildren: () => import('./views/base/base.module').then(m => m.BaseModule)
5656
},
5757
{
5858
path: 'buttons',
59-
loadChildren: './views/buttons/buttons.module#ButtonsModule'
59+
loadChildren: () => import('./views/buttons/buttons.module').then(m => m.ButtonsModule)
6060
},
6161
{
6262
path: 'charts',
63-
loadChildren: './views/chartjs/chartjs.module#ChartJSModule'
63+
loadChildren: () => import('./views/chartjs/chartjs.module').then(m => m.ChartJSModule)
6464
},
6565
{
6666
path: 'dashboard',
67-
loadChildren: './views/dashboard/dashboard.module#DashboardModule'
67+
loadChildren: () => import('./views/dashboard/dashboard.module').then(m => m.DashboardModule)
6868
},
6969
{
7070
path: 'icons',
71-
loadChildren: './views/icons/icons.module#IconsModule'
71+
loadChildren: () => import('./views/icons/icons.module').then(m => m.IconsModule)
7272
},
7373
{
7474
path: 'notifications',
75-
loadChildren: './views/notifications/notifications.module#NotificationsModule'
75+
loadChildren: () => import('./views/notifications/notifications.module').then(m => m.NotificationsModule)
7676
},
7777
{
7878
path: 'theme',
79-
loadChildren: './views/theme/theme.module#ThemeModule'
79+
loadChildren: () => import('./views/theme/theme.module').then(m => m.ThemeModule)
8080
},
8181
{
8282
path: 'widgets',
83-
loadChildren: './views/widgets/widgets.module#WidgetsModule'
83+
loadChildren: () => import('./views/widgets/widgets.module').then(m => m.WidgetsModule)
8484
}
8585
]
8686
},

0 commit comments

Comments
 (0)