
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.

Component Architecture for React Server Components
React Server Components let each component fetch its own data, so pages compose instead of prop-drilling. How that reshapes architecture, loading boundaries, and UX.
Aurora Scharff
Aug 20, 2026

Background Jobs with Nitro Tasks API
How to run one-off and scheduled background work in Nuxt using Nitro's Tasks API, and what to watch for per deployment platform.
Reza Baar
Aug 19, 2026

What’s new in Angular 22.1?
Angular 22.1 introduces a major change to Angular’s release cycle, moving to one major release per year. Learn what this means for Angular upgrades, versioning, and the future of the framework.
Alain Chautard
Aug 18, 2026