Merge pull request 'refactor(routes): change home route to lazy loading' (!37) from task/lazy-load-homepage into main
Reviewed-on: https://git.simonis.lol/projects/casino/pulls/37 Reviewed-by: We ball <jan@kjan.email> Reviewed-by: Constantin Simonis <constantin@simonis.lol>
This commit is contained in:
commit
219cbfca0e
2 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { LandingComponent } from './feature/landing/landing.component';
|
import { LandingComponent } from './feature/landing/landing.component';
|
||||||
import { HomeComponent } from './feature/home/home.component';
|
|
||||||
import { authGuard } from './auth.guard';
|
import { authGuard } from './auth.guard';
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
|
@ -10,7 +9,7 @@ export const routes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: 'home',
|
||||||
component: HomeComponent,
|
loadComponent: () => import('./feature/home/home.component'),
|
||||||
canActivate: [authGuard],
|
canActivate: [authGuard],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { NavbarComponent } from '../../shared/components/navbar/navbar.component
|
||||||
templateUrl: './home.component.html',
|
templateUrl: './home.component.html',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export default class HomeComponent {
|
||||||
private keycloakService: KeycloakService = inject(KeycloakService);
|
private keycloakService: KeycloakService = inject(KeycloakService);
|
||||||
public dialog: MatDialog = inject(MatDialog);
|
public dialog: MatDialog = inject(MatDialog);
|
||||||
|
|
||||||
|
|
Reference in a new issue