Tips on types, @defer, and more!

In the 3-2-1 format of the newsletter, I’m posting a few essential articles to revisit, updates to know about, and one question to ponder:

Three short articles to revisit:

  • TypeScript is one of the best tools in the Angular toolbox, especially when using types properly. You can (and most likely must) use types with generics and the HttpClient to specify the type of your data responses. This also applies to signals (as shown in these examples), resources, subjects, and everything else. And always remember that using any is evil.

Two updates worth knowing about:

  • The recording of my 1-hour talk “Intro to Cypress for end-to-end testing” can be found on YouTube. It was too short to cover everything, but it still gives a good overview of what Cypress is all about.
  • Google I/O is coming soon on May 20-21. It’s a free hybrid event to learn about the latest in Angular, web technologies, and even AI and all things Google if you’re so inclined.

One question to ponder:

  • Have you considered using @defer in your apps? It’s the most flexible and configurable option to speed up your Angular applications with lazy-loading and rendering. For instance, if your application has very long pages with a lot of scrolling, you could lazy load the bottom of such pages while scrolling (or using other triggers), making the initial page load much faster.

Angular Can I Use, Global Summit, and more!

In the 3-2-1 format of the newsletter, I’m posting a few essential articles to revisit, updates to know about, and one question to ponder:

Three short articles to revisit:

  • Whether you use RxJs Subjects or Angular Signals for reactivity, using the right visibility modifier in TypeScript can help you expose your application state in a safe, read-only manner. These articles highlight the “why” and the “how” of visibility modifiers. They also cover different interesting syntax options.

Two Angular updates worth knowing about:

  • Angular is evolving rapidly, and new APIs are introduced with both minor and major versions. Some are experimental, some are in developer preview, some are stable, while others get deprecated over time. With Angular Can I Use, you can know the status of any feature in just seconds:
  • The recording of Geekle’s Angular Global Summit is now available for free on YouTube. With talks from Manfred Steye, Stephen Flui, yours truly, and many others, I’m sure you’ll find interesting talks in that video!

One question to ponder

  • Did you know that with the new @for block, you don’t need to declare local variables? You can use $even, $index, and other contextual variables directly:

    Instead of this:
    @for (item of items; track item.id; let idx = $index) {
    {{idx}} - {{item.name}}
    }


    You can do just the following:
    @for (item of items; track item.id) {
    {{$index}} - {{item.name}}
    }

Selectorless update, more conferences, and free videos!

In the 3-2-1 format of the newsletter, I’m posting a few essential articles to revisit, updates to know about, and one question to ponder:

Three (or four) Angular updates to know about:

  • The Angular team started teasing its new “selector-less” RFC with some examples of what this could look like. The goal is to get rid of component and directive selectors (and hopefully extra imports) and this could be available as an experiment as soon as Angular v20:

  • We now have a date and location for ng-conf 2025: October 17-18 in Baltimore, USA. The event is moving closer to Europe and will be preceded by JSConf North America at the same venue on October 14-16.
  • All videos from FrontEnd Nation Angular Day are now available on this Youtube playlist.
  • You can already register for free for the next FrontendNation Event (3-5 June) at https://frontendnation.com/

Two articles to revisit:

  • None this week, lots of videos to watch in the previous section!

One little thing to ponder:

  • Did you know that instead of using [class]=" isImportant ? 'highlight' : ' ' " you can do [class.highlight] ="isImportant" in your templates?