mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Upgrade Angular template to Angular 2 RC3 and migrate to new @angular/router
This commit is contained in:
12
templates/Angular2Spa/ClientApp/routes.ts
Normal file
12
templates/Angular2Spa/ClientApp/routes.ts
Normal 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' }
|
||||
];
|
||||
Reference in New Issue
Block a user