12 lines
505 B
TypeScript
12 lines
505 B
TypeScript
import { Routes } from '@angular/router';
|
|
import { ItemListComponent } from './components/item-list/item-list';
|
|
import { ItemFormComponent } from './components/item-form/item-form';
|
|
import { HomeComponent } from './components/home/home';
|
|
|
|
export const routes: Routes = [
|
|
{ path: '', component: HomeComponent },
|
|
{ path: 'admin', component: ItemListComponent },
|
|
{ path: 'create', component: ItemFormComponent },
|
|
{ path: 'edit/:id', component: ItemFormComponent },
|
|
{ path: '**', redirectTo: '' }
|
|
]; |