What I would like to do is simply following:
@RouteConfig([
{ path: '/user/:id', component: User, name: 'User' },
{ path: '/user', component: User, name: 'User' }
]);
As you can see, that :id
is optional. Somehow I get the feeling that this code example can be shortened, something like this:
@RouteConfig([
{ path: '/user/:id?', component: User, name: 'User' }
]);
BTW, this doesn't work, but it should express what I'm thinking. Is something like this possible?