Anleitung
Data binding
Put values from your JSON into the template, repeat rows for lists, and show parts only when a field is set.
Auf dieser Seite
Values
{{ path }} prints a value. The path uses dots to go into objects.
{ "kunde": { "name": "Erika Mustermann", "ort": "50667 Köln" } }<p>{{ kunde.name }}, {{ kunde.ort }}</p>brevier escapes every value. A < in your data prints as <, and it never
becomes HTML.
If a field is missing, the render stops. The last line of the error names the field and the template line:
BindingError: Missing field 'kunde.strasse' at line 2Formatters
A formatter changes how a value prints. Write it after a |.
| Formatter | Input | Output |
|---|---|---|
money |
1234.5 |
1.234,50 € |
date |
"2026-09-25" |
25.09.2026 |
number |
1234567 |
1.234.567 |
int |
42 |
42 |
<td>{{ betrag | money }}</td>The formatters always use German rules: . between thousands and ,
before the decimals. The machine's language settings do not change them.
money rounds to whole cents, half up, with exact decimal numbers.
Lists
{{#each list}} repeats its content once for every item. Inside the loop,
a path first looks in the current item, then in the whole data.
<tbody>
{{#each rechnung.positionen}}
<tr><td>{{ pos }}</td><td>{{ text }}</td><td>{{ betrag | money }}</td></tr>
{{/each}}
</tbody>Add {{else}} for an empty list:
{{#each rechnung.positionen}}
<p>{{ text }}</p>
{{else}}
<p>No items.</p>
{{/each}}Conditions
{{#if path}} shows its content only when the value is set.
{{#if kunde.firma}}
<p>{{ kunde.firma }}</p>
{{else}}
<p>Private customer</p>
{{/if}}These values count as not set: a missing field, null, false, an empty
text, an empty list and an empty object.
