Start
This commit is contained in:
23
frontend/src/app/app.routes.ts
Normal file
23
frontend/src/app/app.routes.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { LoginComponent } from './pages/login/login.component';
|
||||
import { AdminComponent } from './pages/admin/admin.component';
|
||||
import { DoctorComponent } from './pages/doctor/doctor.component';
|
||||
import { PatientComponent } from './pages/patient/patient.component';
|
||||
import { DoctorRegisterComponent } from './pages/register/doctor/doctor-register.component';
|
||||
import { PatientRegisterComponent } from './pages/register/patient/patient-register.component';
|
||||
import { ForgotPasswordComponent } from './pages/forgot-password/forgot-password.component';
|
||||
import { ResetPasswordComponent } from './pages/reset-password/reset-password.component';
|
||||
import { authGuard } from './guards/auth.guard';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'forgot-password', component: ForgotPasswordComponent },
|
||||
{ path: 'reset-password', component: ResetPasswordComponent },
|
||||
{ path: 'register/doctor', component: DoctorRegisterComponent },
|
||||
{ path: 'register/patient', component: PatientRegisterComponent },
|
||||
{ path: 'admin', component: AdminComponent, canActivate: [authGuard] },
|
||||
{ path: 'doctor', component: DoctorComponent, canActivate: [authGuard] },
|
||||
{ path: 'patient', component: PatientComponent, canActivate: [authGuard] },
|
||||
{ path: '', pathMatch: 'full', redirectTo: 'login' },
|
||||
{ path: '**', redirectTo: 'login' },
|
||||
];
|
||||
Reference in New Issue
Block a user