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:
@ -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: ''}
|
||||
];
|
||||
|
Reference in New Issue
Block a user