Create login route and protect routes (#3)

Co-authored-by: Phan Huy Tran <p.tran@neusta.de>
Reviewed-on: #3
Co-authored-by: ptran <huydw@proton.me>
Co-committed-by: ptran <huydw@proton.me>
This commit is contained in:
ptran
2024-12-18 09:27:44 +00:00
committed by Constantin Simonis
parent 3595348aee
commit 4e27c3fb2e
10 changed files with 56 additions and 60 deletions

View File

@ -1,3 +1,10 @@
import { Routes } from '@angular/router';
import {Routes} from '@angular/router';
import {EmployeeListComponent} from "./employee-list/employee-list.component";
import {LoginComponent} from "./login/login.component";
import {AuthGuardService} from "./auth-guard.service";
export const routes: Routes = [];
export const routes: Routes = [
{path: 'login', component: LoginComponent},
{path: '', component: EmployeeListComponent, canActivate: [AuthGuardService]},
{path: '**', redirectTo: ''}
];