I am migrating an angular2 app to RC2 and trying to use the router\'s version 3 alpha.
I have followed the set up of the plunker given by the angular docs for routin
Try to use provideRoutes instead of provideRouter
import {provideRoutes} from "@angular/router";
and your routing:
provideRoutes([
{path: '', redirectTo: '/myurl'}
])
UPD For now you don't need provideRouters at all. Just write path and import Routes from '@angular/router';
import {RouterModule, Routes} from '@angular/router';
const APP_ROUTES: Routes = [
{path: '', redirectTo: '/somthng', pathMatch: 'full'},
{path: 'somthng', component: SomthngComponent},
{path: 'somthng-list', component: SomthngListComponent}
];
export const your_routing = RouterModule.forRoot(APP_ROUTES);