14 lines
556 B
TypeScript
14 lines
556 B
TypeScript
import { Routes } from '@angular/router';
|
|
import { HeroesComponent } from './heroes/heroes.component';
|
|
import { DashboardComponent } from './dashboard/dashboard.component';
|
|
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
|
|
|
|
export const routes: Routes = [
|
|
|
|
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' }, //путь по умолчанию
|
|
{ path: 'heroes', component: HeroesComponent },
|
|
{ path: 'dashboard', component: DashboardComponent },
|
|
{ path: 'detail/:id', component: HeroDetailComponent },
|
|
|
|
];
|