client-app/src/app/app.routes.ts

24 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-07-02 22:40:35 -03:00
import { Routes } from '@angular/router';
import { AppIdGuard } from './guards/appid.guard';
import { AuthGuard } from './guards/auth.guard';
export const routes: Routes = [
{ path: 'login', loadComponent: () => import('./login/login.component').then(m => m.LoginComponent) },
{ path: 'forgot-password/:token', loadComponent: () => import('./forgot-password/forgot-password.component').then(m => m.ForgotPasswordComponent) },
{ path: 'forgot-password', loadComponent: () => import('./forgot-password/forgot-password.component').then(m => m.ForgotPasswordComponent) },
{ path: 'register', loadComponent: () => import('./register/register.component').then(m => m.RegisterComponent) },
{ path: '404', loadComponent: () => import('./shared/components/not-found/not-found.component').then(m => m.NotFoundComponent) },
2025-07-02 22:40:35 -03:00
{
path: ':appId',
children: [
{ path: 'home', loadComponent: () => import('./home/home.component').then(m => m.HomeComponent) },
{ path: 'usersettings', loadComponent: () => import('./user-settings/user-settings.component').then(m => m.UserSettingsComponent) },
2025-07-02 22:40:35 -03:00
{ path: 'add-carnet', loadComponent: () => import('./carnet/add/add-carnet.component').then(m => m.AddCarnetComponent) },
{ path: 'edit-carnet/:headerid', loadComponent: () => import('./carnet/edit/edit-carnet.component').then(m => m.EditCarnetComponent) },
2025-07-02 22:40:35 -03:00
{ path: '', redirectTo: 'home', pathMatch: 'full' }
],
canActivate: [AuthGuard, AppIdGuard]
},
{ path: '', redirectTo: 'login', pathMatch: 'full' },
{ path: '**', redirectTo: '/404' }
];