Files
angular-challenges/apps/testing-todos-list/src/app/app.route.ts
2023-04-24 22:11:07 +02:00

26 lines
513 B
TypeScript

import { Routes } from '@angular/router';
export const PARAM_TICKET_ID = 'ticketId';
export const APP_ROUTES: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: 'list',
},
{
path: 'list',
loadComponent: () =>
import('./list/list.component').then((m) => m.ListComponent),
},
{
path: `detail/:${PARAM_TICKET_ID}`,
loadComponent: () =>
import('./detail/detail.component').then((m) => m.DetailComponent),
},
{
path: '**',
redirectTo: 'list',
},
];