Another month, another minor version of our favorite front-end framework!
Zoneless
This time around, Zoneless change detection becomes stable (more about Zoneless here), so you can remove Zone.js from the equation if you’ve followed the rules to make sure Angular will detect your changes properly with OnPush-compatible components.
Animations
The @angular/animations package is deprecated and replaced with a new API using the animate.enter
/animate.leave
syntax as follows:
<div animate.enter="fade-in" animate.leave="fade-out">My content</div>
Code language: HTML, XML (xml)
Aliases in blocks
You can use local aliases in if
, else
, and else if
blocks as follows:
@if (currentUser(); as user) {
Welcome user {{ user.name }}!
} @else if (expiredSession(); as exp) {
Please log in. Your session expired at {{ exp.time }}
}
Code language: JavaScript (javascript)
New diagnostics
Diagnostics give you hints and feedback on possible mistakes. These apply to instances where your code compiles but is likely doing something wrong. A new diagnostic called uninvokedFunctionInTextInterpolation
has been added to warn you when you use a method in a template without calling it (forgot the parentheses).
Testing
You can now use a headless browser with your Vitest unit tests using the builder introduced in v20. This is still experimental, though.
As a reminder, here are the updates from the previous version, Angular 20.1.