-
Notifications
You must be signed in to change notification settings - Fork 279
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
[Angular] Upgrade to version 18 #2028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the UrlTree
related changes from upgrade guide:
When a guard returns a UrlTree as a redirect, the redirecting navigation will now use replaceUrl if the initial navigation was also using the replaceUrl option. If you prefer the previous behavior, configure the redirect using the new NavigationBehaviorOptions by returning a RedirectCommand with the desired options instead of UrlTree.
and
Route guards and resolvers can now return a RedirectCommand object in addition to a UrlTree and boolean. Any code which reads Route objects directly and expects only boolean or UrlTree may need to update to account for RedirectCommand as well.
Client navigation fails currently for monorepo xmcloud setup, I think it may be related. And I also believe we need to accound for RedirectCommand
in guard resolver.
@art-alexeyenko How did you reproduce? I scaffolded |
@art-alexeyenko I introduced support for RedirectCommand, however I consider it as a new feature rather than a required part of the upgrade. In any case I decided to introduce that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you Illia
Description / Motivation
Upgraded Angular to version 18:
CanActivate
RedirectCommand
APICanActivate
andCanResolve
now also acceptrouter
as a parameter, giving accessibility to router instance in function-based implementationsTesting Details
Types of changes