
Intermediate workshop
Modern Angular November
Master the latest Angular features to build modern applications. Learn how to use standalone components, signals, the new inject method and much more.
Learn more
Angular 19.2 introduced a new feature that surprised many developers: template literals in templates. At first glance, this might seem like syntactic sugar—a way to avoid writing multiple [class][style]
"Why is this useful? Isn’t it less readable than just using
or [ngClass]?" [class.x]
Let’s unpack that.
They allow you to write inline string expressions using backticks (`) in bindings like [class][style][attr]
This mirrors standard JavaScript string interpolation. Angular 19.2 compiles these expressions directly into string values, making it possible to dynamically generate styles, class names, and more—without extra computed logic or verbose object literals.
Angular templates had a limited way to express compositional logic. For instance, building a dynamic class name or style string often required verbose, imperative structures like [ngClass]
You can write JavaScript-like string logic directly in your templates:
No need for multiple [class.x][ngStyle][ngClass]
Let us look at a simple AppComponent and how different styling approaches are compiled.
Component:
1. Multiple [class.className]
Template:
<div [class.active]="isActive" [class.disabled]="isDisabled">Content</div>
Compiled Output:
Analysis: The compiler generates separate classProp
2. [ngClass]
Template:
<div [ngClass]="{ 'active': isActive, 'disabled': isDisabled }">Content</div>
Compiled Output:
Analysis: The compiler uses the classMap
3. [ngStyle]
Template:
<div [ngStyle]="{ 'color': textColor, 'font-size': fontSize + 'px' }">Content</div>
Compiled Output:
Analysis: The styleMapngClass
4. Template Literals (Introduced in Angular 19.2):
Template:
<div [class]="`btn-${buttonType}`" [style]="`color: ${textColor}; font-size: ${fontSize}px`">Content</div>
Compiled Output:
Analysis: With template literals, the compiler generates classMapstyleMap
If you're working in a design system or using Figma tokens, template literals are a perfect fit.
Compare that with a traditional approach:
The template literal version is cleaner, declarative, and scalable.
If you're already using signal()computed()
➡️ This works, but adds more code for small visual logic.
But with Angular 19.2, there's now an even leaner alternative: template literals. You can still benefit from reactivity (via signals), but without the extra boilerplate of creating a computed()
No need to create extra computed signals or helper methods—everything stays declarative.
Template literals in Angular 19.2 are more than just sugar. They bring Angular closer to the ergonomics of modern JS frameworks—without losing performance. They may not replace every [ngClass][ngStyle]

Intermediate workshop
Master the latest Angular features to build modern applications. Learn how to use standalone components, signals, the new inject method and much more.
Learn more
If Signals were Angular’s “aha!” moment, Zoneless is the “oh wow—this feels snappy” moment. With Angular v21, new apps use zoneless change detection by default. No more zone.js magic under the hood—just explicit, predictable reactivity powered by Signals.

Deploy one Angular app for many clients with unique configs—without breaking SSR or DX. Here’s how to unlock dynamic configuration.

Implement incremental hydration in a real-world Angular app - Basic setup, hydration triggers and important considerations for a seamless integration.

Let's dive deeper into why incremental hydration in Angular matters so much for performance and user experience, focusing on its influence on Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS).

Incremental hydration is a groundbreaking new feature in Angular that heavily impacts critical performance metrics like INP and LCP, while also reducing the effort required to maintain CLS at low levels.

Think of an AST as the secret blueprint, the hidden structure that reveals the true meaning of your code – way more than just the lines you see on the screen. Let's dive in and demystify these ASTs, and I promise you'll see your code in a whole new light.