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
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 returnT | RedirectCommandinstead of justT(Clone of ResolveFn)Alternatives considered
Remove RedirectCommand from resolvers all together? It's confusing that you can only redirect from certain types of resolvers