You can use a wildcard to do that and either redirect to any other route or have a 404 component for that:
@RouteConfig([
{ path: '/', name: 'Welcome', component: WelcomeComponent, useAsDefault: true },
{ path: '/products', name: 'Products', component: ProductListComponent },
{ path: '/product/:id', name: 'ProductDetail', component: ProductDetailComponent },
// Redirect option:
// { path: '/**', redirectTo:['Welcome'] },
// Not found component option:
// {path: '/**', component: NotFoundComponent},
// Both together:
{ path: '/not-found', name: 'NotFound', component: NotFoundComponent},
{ path: '/**', redirectTo:['NotFound'] },
])
Note that in the version of Angular that I'm using right now, 2.0.0-beta.15
, if you put just path: '/*'
it won't work, see here.