# @defer

Template syntax that loads a block and its code only when needed.

## What does `@defer` do?

`@defer` delays loading part of a template (and its code) until it is needed, for example until it scrolls into view. `@placeholder` shows while waiting.

```html
@defer (on viewport) {
  <app-comments />
} @placeholder {
  <p>Comments load when you scroll here</p>
}
```

Level: Journeyman · [More Angular terms at this level](https://www.ask-codey.com/glossary?category=angular&level=3)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/defer-angular
