From 840d6b5bfd6c304a40f021b494586e5d26891627 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Wed, 19 Feb 2025 11:06:57 +0100 Subject: [PATCH 1/2] refactor(routes): change home route to lazy loading --- frontend/src/app/app.routes.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/app/app.routes.ts b/frontend/src/app/app.routes.ts index 73ed20c..dc68406 100644 --- a/frontend/src/app/app.routes.ts +++ b/frontend/src/app/app.routes.ts @@ -1,6 +1,5 @@ import { Routes } from '@angular/router'; import { LandingComponent } from './feature/landing/landing.component'; -import { HomeComponent } from './feature/home/home.component'; import { authGuard } from './auth.guard'; export const routes: Routes = [ @@ -10,7 +9,7 @@ export const routes: Routes = [ }, { path: 'home', - component: HomeComponent, + loadComponent: () => import('./feature/home/home.component'), canActivate: [authGuard], }, ]; From 562a93bbf16f550fb34351126e7e1d7eec6d250e Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Wed, 19 Feb 2025 11:07:46 +0100 Subject: [PATCH 2/2] refactor(home): change HomeComponent to default export --- frontend/src/app/feature/home/home.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/feature/home/home.component.ts b/frontend/src/app/feature/home/home.component.ts index 7475214..d560eb8 100644 --- a/frontend/src/app/feature/home/home.component.ts +++ b/frontend/src/app/feature/home/home.component.ts @@ -11,7 +11,7 @@ import { NavbarComponent } from '../../shared/components/navbar/navbar.component templateUrl: './home.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) -export class HomeComponent { +export default class HomeComponent { private keycloakService: KeycloakService = inject(KeycloakService); public dialog: MatDialog = inject(MatDialog);