
Learn how Angular's @defer block triggers lazy loading and explore the different loading strategies available to control when components are rendered for better performance and user experience.
Alain Chautard
June 2, 2026
We introduced the new @defer block to lazy-load components on the screen. We saw that @defer includes several config options to display errors, placeholder, and loading templates.
Today, let’s focus on the possible triggers for such lazy loading.
This is the default option. Will load the contents of that block once the browser is in an idle state:

Triggers the deferred block when its content enters the viewport. For instance, that would be when the user scrolls down, and the block becomes “visible.” Note that this option requires a placeholder (used to detect when the element comes into the viewport):

Another interesting option is to load the deferred block when another specified element makes it into the viewport using a template reference variable. That option does not require a placeholder:

Waits for the user to interact with the placeholder to load the deferred block. Even better, this trigger can be combined with another element so you can lazy-load a component on a button click, for instance:

The above code can be tested on Stackblitz here.
Similar to the two previous examples. Waits for the user to hover over the placeholder or a specified element:

immediate triggers the deferred block immediately as soon as Angular has finished rendering. Timer waits for a specified delay:
You can see most of these different examples on Stackblitz here. There are a few more options for '''@defer''' that I’ll cover later to keep this newsletter short and readable. It’s incredible what such a small API can do!
Get the latest news and updates on developer certifications. Content is updated regularly, so please make sure to bookmark this page or sign up to get the latest content directly in your inbox.

Performance Optimization in Nuxt
Practical techniques for faster Nuxt apps
Reza Baar
Jul 15, 2026

Cache Components in Next.js
Cache Components is the Next.js 16 caching model behind Instant Navigations. Learn use cache, cacheLife, and cacheTag, and why data is dynamic by default.
Aurora Scharff
Jul 9, 2026

Migrating to Vite 8 + Rolldown
A step-by-step account of upgrading a production Vue app to Vite 8 and Rolldown, the config changes that broke, and the actual build numbers before and after.
Reza Baar
Jul 8, 2026