Angular 18 brings a new feature for working with redirects. We can now use functions instead of strings to specify the redirect URL in the redirectTo property (Route object). The new feature adds more flexibility to routing and provides new opportunities.
Inside the function, the framework gives access to an object with information about the URL. In this video I explain in detail how it works. I use a visual approach to explanation to improve understanding and save time.
Timestamps
0:00 New Feature in Angular 18
0:28 Return Value Requirement (string or UrlTree)
0:51 Parameters (from query and route)
ℹ️Thanks to the @Angular Team for the valuable work.
Source: https://github.com/angular/angular/pu...
☕️ Donation: / igorsedov
For more tips and updates, follow me on:
▪️Twitter: / theigorsedov
▪️LinkedIn: / igorsedov
▪️Instagram: / theigorsedov
Website: https://igorsedov.com
Email: [email protected]
#angular #angular18