fixed rout

This commit is contained in:
sdarbinyan
2026-01-23 00:53:35 +04:00
parent 2e516fa4d3
commit 34f6c80e57
45 changed files with 0 additions and 0 deletions

38
src/app/app.routes.ts Normal file
View File

@@ -0,0 +1,38 @@
import { Routes } from '@angular/router';
import { authGuard, loginGuard } from './guards/auth.guard';
import { LoginComponent } from './components/login/login.component';
import { DashboardComponent } from './components/dashboard/dashboard.component';
import { ActiveChecksComponent } from './components/active-checks/active-checks.component';
import { HistoryComponent } from './components/history/history.component';
export const routes: Routes = [
{
path: '',
redirectTo: '/login',
pathMatch: 'full'
},
{
path: 'login',
component: LoginComponent,
canActivate: [loginGuard]
},
{
path: 'dashboard',
component: DashboardComponent,
canActivate: [authGuard]
},
{
path: 'active-checks',
component: ActiveChecksComponent,
canActivate: [authGuard]
},
{
path: 'history',
component: HistoryComponent,
canActivate: [authGuard]
},
{
path: '**',
redirectTo: '/login'
}
];