mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
35 lines
788 B
TypeScript
35 lines
788 B
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { DashboardComponent } from './dashboard.component';
|
|
import { HeroesComponent } from './heroes.component';
|
|
import { HeroDetailComponent } from './hero-detail.component';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: '',
|
|
redirectTo: '/dashboard',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'dashboard',
|
|
component: DashboardComponent
|
|
},
|
|
{
|
|
path: 'detail/:id',
|
|
component: HeroDetailComponent
|
|
},
|
|
{
|
|
path: 'heroes',
|
|
component: HeroesComponent
|
|
}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|
|
|
|
export const routedComponents = [DashboardComponent, HeroesComponent, HeroDetailComponent];
|