angular2 rc3...Using the new router (alpha 3.0.0-alpha.7), how do i specify a default route? useAsDefault is the old router...and '*' doesn't seem to work.
this shoud make it clear what i want...i cannot get the "NotFoundComponent" part working.
export const routes: RouterConfig = [
{ path: 'abc', component: AbcComponent },
{ path: 'def', component: DefComponent },
{ path: '', component: HomeComponent },
{ path: '*', component: NotFoundComponent } // something like this
];
thanks!
I believe it should be
{ path: '**', component: NotFoundComponent }
Here is the doc
BTW,
There is a way if you want to set root to default route.
Set pathMatch = 'full' and set redirectTo value
Here is the blog post talking about this