duck-booking-tool-front/app/app.routing.ts
Gergely Polonkai 29a0eb7f33 Move to using routers
Signed-off-by: Gergely Polonkai <gergely@polonkai.eu>
2016-09-09 14:42:14 +02:00

29 lines
712 B
TypeScript

import { ModuleWithProviders } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { DucksComponent } from "./ducks.component";
import { DuckDetailComponent } from "./duck-detail.component";
import { DashboardComponent } from "./dashboard.component";
const appRoutes: Routes = [
{
path: "",
redirectTo: "/dashboard",
pathMatch: "full"
},
{
path: "dashboard",
component: DashboardComponent
},
{
path: "ducks",
component: DucksComponent
},
{
path: "detail/:id",
component: DuckDetailComponent
}
]
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);