22 lines
810 B
TypeScript
22 lines
810 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
import { OwnerComponent } from './component/owner/owner.component';
|
|
import { HorseComponent } from './component/horse/horse.component';
|
|
import { AddHorseComponent } from './component/add-horse/add-horse.component';
|
|
import { UpdateHorseComponent } from './component/update-horse/update-horse.component';
|
|
|
|
|
|
const routes: Routes = [
|
|
{path: '', redirectTo: 'owner', pathMatch: 'full'},
|
|
{path: 'owner', component: OwnerComponent},
|
|
{path: 'horse', component: HorseComponent},
|
|
{path: 'horse/add', component: AddHorseComponent},
|
|
{path: 'horse/:id/edit', component: UpdateHorseComponent},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|