Skip to content

Commit 742cc35

Browse files
committed
Migration to lazy loaded routes
1 parent fe86f7d commit 742cc35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webapp/src/app/app-routing.module.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3-
import { IndexComponent } from './components/index/index.component';
4-
import { ProjectsComponent } from './components/projects/projects.component';
3+
4+
55

66
const routes: Routes = [
7-
{path: '', component: IndexComponent},
8-
{path: 'project', component: ProjectsComponent},
7+
{path: '', loadComponent: () => import('./components/index/index.component').then(m => m.IndexComponent)},
8+
{path: 'project', loadComponent: () => import('./components/projects/projects.component').then(m => m.ProjectsComponent)},
99
];
1010

1111
@NgModule({

0 commit comments

Comments
 (0)