Text node
Simple interpolation: {{greeting}}!
Anything anywhere
Ren{{text1}}er any{{text2}}ng an{{text3}}re
Interpolation with function
Interpolation with function: {{greet()}}!
Interpolation with function and parameters
Interpolation with function and params: {{greet('Hello', who)}}!
Path
Access data with dot notation: {{path.greet}} {{path.name(path.who)}}!
Array
Access array value: {{greet[0]}} {{greet[1]}}!
Repeater on array
[{{$index}}] {{greet}} {{item.name}}!
Repeater on object
[{{$key}}] {{greet}} {{item}}!
Multiple repeaters and parent scope
[{{$index}}] {{section.name}}
- [{{../$index}}] [{{$index}}] {{item}} ({{../section.name}})
render html
{{firstLine}}{{secondLine}}
Watch token
Watch my name: {{name}}
Skip from an element
Show my name: {{name}}, but not my age: {{age}}
Hide token before rendering
.data-cloak {
display: none;
}
This token is shown: {{name}}, but not this one: {{age}}
Show and hide element
Show and hide:
I was on screen!
And now it is me!
Checkbox checked
Simple or multiple select box