44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
|
|
import { AdminGuard } from './guards/admin.guard';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
loadComponent: () =>
|
|
import('./hero/hero.component').then((m) => m.HeroComponent),
|
|
},
|
|
{
|
|
path: 'about',
|
|
loadComponent: () =>
|
|
import('./about/about.component').then((m) => m.AboutComponent),
|
|
},
|
|
{
|
|
path: 'schedule',
|
|
loadComponent: () =>
|
|
import('./schedule/schedule.component').then((m) => m.ScheduleComponent),
|
|
},
|
|
{
|
|
path: 'events',
|
|
loadComponent: () =>
|
|
import('./events/events.component').then((m) => m.EventsComponent),
|
|
},
|
|
{
|
|
path: 'contact',
|
|
loadComponent: () =>
|
|
import('./contact/contact.component').then((m) => m.ContactComponent),
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadComponent: () =>
|
|
import('./login/login.component').then((m) => m.LoginComponent),
|
|
},
|
|
{
|
|
path: 'admin',
|
|
canActivate: [AdminGuard],
|
|
loadComponent: () =>
|
|
import('./admin/admin.component').then((m) => m.AdminComponent),
|
|
},
|
|
{ path: '**', redirectTo: '' },
|
|
];
|