40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import { authGuard } from './core/guards/auth.guard';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
redirectTo: 'dashboard',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadComponent: () => import('./features/auth/login.component').then(m => m.LoginComponent)
|
|
},
|
|
{
|
|
path: 'dashboard',
|
|
canActivate: [authGuard],
|
|
loadComponent: () => import('./features/dashboard/dashboard.component').then(m => m.DashboardComponent)
|
|
},
|
|
{
|
|
path: 'reservas',
|
|
canActivate: [authGuard],
|
|
children: [
|
|
{
|
|
path: '',
|
|
redirectTo: 'calendario',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'calendario',
|
|
loadComponent: () => import('./features/reservas/calendar-booking/calendar-booking.component').then(m => m.CalendarBookingComponent)
|
|
},
|
|
{
|
|
path: 'nuevo',
|
|
loadComponent: () => import('./features/reservas/reserva-form/reserva-form.component').then(m => m.ReservaFormComponent)
|
|
}
|
|
]
|
|
}
|
|
];
|
|
// Modules for each subagent will be lazily loaded here.
|