From db637f1ed5fb52679d370f6fdba4e06fa9e17de8 Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Sat, 26 Mar 2016 00:48:53 +0100 Subject: [PATCH] add routes --- app/app.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/app.component.ts b/app/app.component.ts index 9d01e64..3917450 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,6 +1,7 @@ import {Component} from 'angular2/core'; import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router'; -import {LocationComponent} from './LocationComponent/location.component'; +import {LocationDetailComponent} from './LocationDetailComponent/locationdetail.component'; +import {LocationsComponent} from './LocationsComponent/locations.component'; import {UserComponent} from './UserComponent/user.component'; import {LocationService} from './services/location.service'; @@ -12,7 +13,8 @@ import {LocationService} from './services/location.service'; }) @RouteConfig([ - {path: '/location/:id', name: 'Location', component: LocationComponent}, + {path: '/', name: 'Locations', component: LocationsComponent}, + {path: '/location/:id', name: 'Location', component: LocationDetailComponent}, {path: '/user/:id', name: 'User', component: UserComponent}, ])