Angular v21 released with experimental Signal Forms
The latest version of the web framework Angular is now available, with new features like Signal Forms (experimental), Angular Aria (preview), and updates to the Angular MCP Server.
“With the release of v21, Angular is an even greater partner for your daily adventures — giving you the stability of the Angular framework while enabling you to build great AI-powered applications that are scalable and accessible for everyone,” Jens Kuehlers, technical program manager for Angular, and Mark “Techson” Thompson, staff developer relations engineer for Angular, wrote in a blog post.
Signal Forms is a library that allows developers to manage form state using signals. With this library, the form model is defined by a signal which syncs to the form fields that are bound to it, ensuring full type-safety for accessing form fields. Common validation patterns, like email validation or regular expression matching, come built in, and developers can also create their own custom validations.
Angular Aria is a new library that provides headless components that were built with accessibility as the top priority. The developer preview includes eight UI patterns, including Accordion, Combobox, Grid, Listbox, Menu, Tabs, Toolbar, and Tree. The components come unstyled so that developers can customize them however they want.
“Building accessible components seems straightforward, but implementing them according to the W3 Accessibility Guidelines requires significant effort and accessibility expertise. Angular Aria is a collection of headless, accessible directives that implement common WAI-ARIA patterns. The directives handle keyboard interactions, ARIA attributes, focus management, and screen reader support. All you have to do is provide the HTML structure, CSS styling, and business logic,” the documentation states.
The team also announced new tools in the Angular MCP Server, which was first introduced in Angular v20.2:
- get_best_practices provides access to the Angular best practices guide and the list_projects tool finds all Angular projects in a workspace
- search_documentation searches the official Angular documentation and the find_examples tool provides examples of modern Angular patterns
- onpush_zoneless_migration analyzes code and provides a migration plan to OnPush and zoneless change detection
- ai_tutor helps developers learn core Angular concepts and get feedback
Angular v21 also marks the start of Vitest being made the default test runner. The team deprecated the previous test runner, Karma, in 2023 and has since been exploring a couple of different replacement options, including Jest, Web Test Runner, and Vitest, and ultimately decided on Vitest. Karma and Jasmine are still being fully supported for now so there isn’t an urgent need to migrate at the moment.
Additionally, in this release, zone.js, a library that patches browser APIs and was used to keep track of applications, is no longer included by default. Zoneless change detection will be the new default, as it provides benefits like better Core Web Vitals, native async-await, ecosystem compatibility, reduced bundle size, easier debugging, and better control, the team explained.
Finally, the Angular team put in significant effort to improve the documentation experience for this release. The Routing documentation has been totally reworked and now provides more detailed information about all routing aspects, the dependency injection guide was improved, a new guide for how to theme Material components was added, and a new guide for how to use Angular with Tailwind CSS was added.
Other updates in this release include upgrading CLDR library support from v41 to v47, adding support for regular expressions in templates, and a built-in Signals formatter.
More information about the latest release can be found in the Angular team’s blog post.
The post Angular v21 released with experimental Signal Forms appeared first on SD Times.
Tech Developers
No comments