Problem: Depending on user's permission another default route should be used.
@RouteConfig([
{ path: '/x1', name: 'x1', component: X1Component, useAsDefault: true },
{ path: '/x2', name: 'x2', component: X2Component},
{ path: '/x3', name: 'x3', component: X3Component},
{ path: '/x4', name: 'x4', component: X4Component},
{ path: '/x5', name: 'x5', component: X5Component}
])
Given x1
as a default route in above RouteConfig
but current user does not have permission to access this page, x2
should be used as default route if permission will be granted and so on.
Anyway, we've tried the attribute loader
already. The problem there is, that the url won't be updated (e.g. from /x1
to x2
) and this occurs other problems such as not having the css class router-link-active
automatically attached to a link in our menu.
Of course we could write an workaround but how are you solving this kind of problem?