-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerbreaking changes
Milestone
Description
Which @angular/* package(s) are relevant/related to the feature request?
router
Description
In angular 18, class-based route resolvers were de-deprecated. In addition, we are now able to return a RedirectCommand from route resolvers. However, it seems like this feature was not carried over to class-based route resolvers.
https://angular.dev/api/router/Resolve should have the same features as https://angular.dev/api/router/ResolveFn
Proposed solution
Allow resolve() function on Resolve interface to return T | RedirectCommand instead of just T (Clone of ResolveFn)
Alternatives considered
Remove RedirectCommand from resolvers all together? It's confusing that you can only redirect from certain types of resolvers
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerbreaking changes