This repository was archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Scalars
Lukas Jans edited this page Feb 21, 2019
·
1 revision
You can render scalars by assigning them to a placeholder tag in your template:
Elements.render('Hello {{name}}', {name: 'Alice'});Hello Alice
Often a single object is not sufficient for holding all required data. Therefore, the passed object may contain other objects. Like usual, you can cascade through them using dots:
Elements.render('I passed {{exam.name}} with {{exam.points}} points!', {
exam: {
name: 'Algebra',
points: 48,
},
});I passed Algebra with 48 points!
Note: You could also make use of a recursive section:
{{#exam}}
I passed {{name}} with {{points}} points!
{{/exam}}