A fresh template compiler, already live in recent releases, took center stage, alongside concrete details on what Angular 18 will bring for developers looking to move beyond zone.js.
The New Template Compiler
Dylan Hunn and Miles Malerba from the Angular team walked viewers through a fundamentally reworked compiling process. The previous compiler functioned as a single "monolithic chunk," which proved cumbersome to maintain and extend with new capabilities.
This new architecture uses a structured pipeline, a change intended to make internal iteration and feature development faster and more efficient.
The session was not purely an internal deep dive, though it leaned heavily that way. It still provided valuable insight into the internal mechanics and highlighted the significant engineering challenges currently on the Angular team's plate.
A particularly notable point was how many optimization tasks the template compiler now handles. This level of work is often associated with bundlers like webpack or esbuild. However, because this compiler understands Angular's syntax and specific context, it can make more targeted decisions about how to streamline the output compared to generic tools.
While not the main focus of the compiler talk, a slide from Dylan showcased other in-progress features. Among these was "selectorless," a concept that allows components to be defined without a selector property.
This new pipeline has been the standard for compilation since Angular 17.3.
Zoneless in Angular 18
A primary driver behind the Signals initiative has been the ability to run applications without zone.js. Initially, this capability was thought to be locked behind the Signal Components feature. That is no longer the case. The goal has shifted, and an alternative path to a Zoneless application will be available in the next release, due next month.
Two community articles have already explored this subject in depth. One is authored by Matthieu Riegler, the other by Enea Jahollari.
Matthieu's analysis focuses on a new "hybrid" change detection. In this model, various triggers—such as a Signal change, an async pipe emission, or any direct call to markForCheck—will also automatically initiate change detection. This holds true even in the edge case where the code executing these calls exists outside the zone.js context.
Enea's article takes a more direct approach, detailing how to disable zone.js entirely and place full responsibility for triggering updates on these new mechanisms.
https://justangular.com/blog/a-new-era-for-angular-zoneless-change-detection
Keeping Up with Modern Angular
Given the quick release cycle, staying current with Angular is essential. To help with that, Manfred Steyer has updated his book "Modern Angular" to a second edition. The entire book is available to read free of charge.
