Interpolation
Reading the context from the prose itself.
{{ expression }} reads the context from the prose itself. It is an IR node,
evaluated by the same sandboxed interpreter as every binding and refreshed on
the same cycle.
Using it
You have {{ items.length }} items, worth {{ format(total) }}.Pressed 0 times — go on.
<div>Pressed {{ count }} times — {{ count === 0 ? 'go on' : 'thank you' }}.</div>Anywhere text goes
Interpolation works inside headings, list items, table cells, links and a component's children — anywhere the IR holds text.
## Release {{ version }}
- Pressed {{ count }} times
- [Read more]({{ docsUrl }})
<app-button>Buy for {{ price }}</app-button>The same rules as a binding
It is the same expression language, so the same subset applies, and the same
guarantees: no eval, no globals, nothing outside your context.
{{ user?.profile?.name ?? 'Anonymous' }}A value that is not text
An expression that evaluates to null or undefined renders nothing. Objects
and arrays are rendered with String(value), the same as an Angular template.