Angular: From Zero to Expert

Angular: From Zero to Expert

Angular 21.2: What's new

Angular 21.2.0 introduces TypeScript 6 support, exhaustive @switch checks, instanceof in templates, massive signal forms improvements, nested animations and a bunch of DX improvements.

Amos Isaila's avatar
Amos Isaila
Mar 08, 2026
∙ Paid
Angular 21.2 What's new

1. @angular/animations

2. @angular/build

a) Headless Option for Unit-Test Builder - PR

The unit-test builder now supports a headless option for browser-based tests. You can toggle between headless and headed mode without modifying your Vitest configuration.

ng test --headless=false  # Run with visible browser for debugging
ng test                   # Default: headless

b) Vitest Browser with Playwright OS Theme - PR

When running Vitest browser tests with Playwright, the browser now respects your operating system’s theme (light/dark mode). This means your tests run in an environment that matches your system preferences, which can be relevant for testing theme-dependent UI behavior.

Angular: From Zero to Expert is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

3. @angular/common

a) Outlet Injector Option for ngTemplateOutlet - PR

To understand this feature, you first need to understand a quirk of how ngTemplateOutlet works with Angular’s dependency injection.

The problem: templates resolve services from where they’re defined, not where they’re rendered.

Imagine you define an <ng-template> at the root of your component. Inside that template, you try to inject() a service. Angular will look for that service starting from the definition site of the template (where the <ng-template> tag lives in the source code), not from where the template is actually stamped into the DOM via *ngTemplateOutlet.

Here’s a concrete example to make this tangible:

User's avatar

Continue reading this post for free, courtesy of Amos Isaila.

Or purchase a paid subscription.
© 2026 Amos Isaila · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture