-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic redirect route handler #585
Comments
@valichek can you give me a real example? It seems like it could be useful but I can't think of a valid use case. |
@davismj real use case: we have ACLs, child router is configured with all possible routes, navigation menu is filtered according to ACL, user can switch role any time, depending on role default route in child router can be different. |
@davismj another use case, consider we want to handle |
@valichek and |
@davismj |
We have routes that look like '/clients/module' and want to change to '/clients/:clientId/module' but we have a lot of places where the old routes still exist (emails we sent, user's bookmarks, etc.) that are beyond our control. The solution proposed here would help us to create a dynamic redirector that would capture any navigation event to the old URL, inspect the current user's state information, and redirect to the new url with the :clientId parameter in place. |
I'm submitting a feature request
Having possibility to redirect from route handler would be a nice feature
For example sometimes I need redirect with some logic.
This could look like following:
Current behavior:
Now it's possible to handle redirect in modelView handlers like canActivate(). So I need to create dummy module and place redirection logic to
canActivate()
.The text was updated successfully, but these errors were encountered: