Upgrade Angular template to Angular 2 RC3 and migrate to new @angular/router

This commit is contained in:
SteveSandersonMS
2016-06-28 12:40:14 +01:00
parent f1325d0cf2
commit 8f2117cf89
9 changed files with 51 additions and 42 deletions

View File

@@ -0,0 +1,12 @@
import { RouterConfig } from '@angular/router';
import { Home } from './components/home/home';
import { FetchData } from './components/fetch-data/fetch-data';
import { Counter } from './components/counter/counter';
export const routes: RouterConfig = [
{ path: '', redirectTo: 'home' },
{ path: 'home', component: Home },
{ path: 'counter', component: Counter },
{ path: 'fetch-data', component: FetchData },
{ path: '**', redirectTo: 'home' }
];