Angular · Directive
@if
@if conditionally renders template content when its condition is truthy. It also supports @else if, @else, and local names for expression results.
Last updated
Syntax
@if (condition) { ... } @else if (otherCondition) { ... } @else { ... }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
@else if@else