Angular · Directive
@defer
@defer lazy-loads template dependencies that are not needed for the first render. It supports triggers, prefetching, and placeholder, loading, and error states.
Last updated
Syntax
@defer (on <trigger>; when <condition>; prefetch on <trigger>; prefetch when <condition>) { ... } @placeholder (minimum? <duration>) { ... } @loading (minimum? <duration>; after? <duration>) { ... } @error { ... }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
@placeholder@loading@errorDeferBlockBehaviorDeferBlockStateIdleService