Skip to content

Conditional rendering

The <cond> tag is used for conditional rendering.

html
<cond if="item.isActive">
  <div>Item is active</div>
</cond>
AttributesUse
if="…"Render the content only if some variable holds the value true.
Only one condition may be used per tag. Using multiple condition attributes for a single tag is invalid and will result in a compile-time error.