Hey there,
Angular 21 is officially here! Well, not today. Back in November 2025
TL;DR 🙌
✅ Signal Forms (experimental), a new signal-based way to build forms
✅ Zoneless is the default for new apps
✅ Vitest is now the default test runner
✅ Angular Aria: headless, accessible UI components (developer preview)
✅ Angular CLI MCP server for AI-assisted development
✅ HttpClient provided by default
✅ Regular expressions in templates
✅ New migrations: NgClass → [class], NgStyle → [style]
How to update to version 21
Visit angular.dev/update-guide for detailed information and guidance. To have the best update experience,
Update to 21
ng update @angular/cli @angular/core
In order to update your global angular,
npm i -g @angular/cli
🔥 What's in this release?
✅ Signal Forms (Experimental)
- Forms built on top of Signals
- Your form model is just a
signal - Validation is declared in one place, using a schema function
Creating a form
import { Component, signal } from '@angular/core';
import { form, Field, required, email } from '@angular/forms/signals';
@Component({
selector: 'app-login',
imports: [Field],
template: `
<input type="email" [field]="loginForm.email" />
@if (loginForm.email().invalid() && loginForm.email().touched()) {
@for (error of loginForm.email().errors(); track error) {
<p class="error">{{ error.message }}</p>
}
}
<input type="password" [field]="loginForm.password" />
<button [disabled]="loginForm().invalid()">Login</button>
`
})
export class LoginComponent {
// 👉 the model is a plain signal
login = signal({ email: '', password: '' });
// 👉 the form is built from the model, plus validation rules
loginForm = form(this.login, (path) => {
required(path.email, { message: 'Email is required' });
email(path.email, { message: 'Enter a valid email' });
required(path.password, { message: 'Password is required' });
});
}
Reading the form state
👉 Every field is a signal, so its state updates automatically
console.log(this.loginForm.email().value()); // current value
console.log(this.loginForm.email().valid()); // true / false
console.log(this.loginForm().invalid()); // whole form
// update the model and the form follows
this.login.set({ email: 'sandy@dev.to', password: '123456' });
✅ Zoneless by default
- New apps created with
ng newno longer includezone.js - Change detection is driven by Signals and events
- Smaller bundles, cleaner stack traces, better performance
// app.config.ts (new projects)
import { ApplicationConfig, provideZonelessChangeDetection } from '@angular/core';
export const appConfig: ApplicationConfig = {
providers: [
provideZonelessChangeDetection()
]
};
👉 Existing apps keep working with zone.js. You can move to zoneless when you're ready.
✅ Vitest is the default test runner
- Karma is out, Vitest is in for new projects
- Faster runs and a modern testing experience
ng test
import { TestBed } from '@angular/core/testing';
import { describe, it, expect, beforeEach } from 'vitest';
import { CounterComponent } from './counter.component';
describe('CounterComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({ imports: [CounterComponent] });
});
it('should increment', () => {
const fixture = TestBed.createComponent(CounterComponent);
fixture.componentInstance.increment();
expect(fixture.componentInstance.count()).toBe(1);
});
});
👉 Migrating existing Jasmine tests (experimental)
ng generate @schematics/angular:refactor-jasmine-vitest
✅ Angular Aria (Developer Preview)
- A new library of headless components
- Accessibility, keyboard navigation and focus are handled for you
- You bring your own styles
- Includes Accordion, Combobox, Grid, Listbox, Menu, Tabs, Toolbar, Tree and more
npm i @angular/aria
<ul ngListbox [(value)]="selectedFruit">
<li ngOption value="apple">🍎 Apple</li>
<li ngOption value="banana">🍌 Banana</li>
<li ngOption value="mango">🥭 Mango</li>
</ul>
✅ Angular CLI MCP Server
- Connect AI assistants (Claude, Copilot, Cursor, Gemini…) to your Angular project
- Gives them up-to-date best practices, docs search, examples and migration tools
ng mcp
{
"mcpServers": {
"angular-cli": {
"command": "npx",
"args": ["-y", "@angular/cli", "mcp"]
}
}
}
✅ HttpClient provided by default
👉 No more provideHttpClient() just to inject HttpClient
import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({ providedIn: 'root' })
export class UserService {
private http = inject(HttpClient); // works out of the box
getUsers() {
return this.http.get('/api/users');
}
}
👉 Still need interceptors or other config? Keep using provideHttpClient(withInterceptors([...])).
✅ Regular expressions in templates
@let isNumeric = /^\d+$/.test(userId());
@if (isNumeric) {
<user-profile [id]="userId()" />
} @else {
<p>Invalid user id</p>
}
✅ New migrations
NgClass → class binding
ng generate @angular/core:ngclass-to-class
<!-- Before -->
<div [ngClass]="{ active: isActive, disabled: isDisabled }"></div>
<!-- After -->
<div [class]="{ active: isActive, disabled: isDisabled }"></div>
NgStyle → style binding
ng generate @angular/core:ngstyle-to-style
<!-- Before -->
<div [ngStyle]="{ 'font-size.px': size }"></div>
<!-- After -->
<div [style]="{ 'font-size.px': size }"></div>
For more, let us hear it from the creators Credits : Official Announcement 😄
Changelog: Repository
Top comments (0)