DEV Community

Cover image for Episode 24/16: New Template Compiler, Zoneless in Angular 18
ng-news for This is Angular

Posted on

Episode 24/16: New Template Compiler, Zoneless in Angular 18

A new - and already running - template compiler was presented, and we got new information about the upcoming Angular 18.

New Template Compiler

Dylan Hunn and Miles Malerba from the Angular team presented a new approach to compiling the template. In the past, the compiler was just a big "monolithic chunk," making it hard to maintain or add new features.

The new version is a more structured pipeline that should speed up internal development.

For obvious reasons, that talk was more than just a deep dive. Nevertheless, you still get a feeling about the internals and understand what challenges the Angular team faces.

It was interesting to hear that the template compiler is performing quite a lot of optimization tasks that we would expect more in the area of webpack or esbuild.

However, because the compiler understands Angular and its context, it can better apply optimizations.

It was not part of the template compiler, but Dylan had a slide showing all the new features they were working on. One of them was selectorless, which means components without selectors.

The Pipeline is set to default since Angular 17.3.

Zoneless in Angular 18

One of the main goals of Signals is to have applications without zone.js. Originally, that would have only been possible with Signal Components. In the meantime, things have changed. It will also be possible without the Signal Component and already in Angular 18, which will arrive next month.

Matthieu Riegler and Enea Jahollari published two articles that focus on that topic.

Matthieu discusses the new hybrid change detection, where a Signal change, an async pipe, or anything else that calls markForCheck now also automatically triggers the Change Detection, even if the code runs outside zone.js (edge case).

Enea's article is all about disabling zone.js and relying only on these new trigger mechanisms.

https://justangular.com/blog/a-new-era-for-angular-zoneless-change-detection

Modern Angular

Angular is moving very fast, so it is important to stay updated. Manfred Steyer has released the second edition of his book Modern Angular and it is available for free.

Top comments (1)

Collapse
 
jangelodev profile image
João Angelo

Hi ng-news,
Your tips are very useful.
Thanks for sharing.