-
Notifications
You must be signed in to change notification settings - Fork 5
Bind Text
Sarsa Parilla edited this page Feb 17, 2022
·
7 revisions
Put your binding expression inside double curly braces and insert it in the text content of any element.
<div>Hello, {{#user.name}}!</div>
A binding expression can contain one or more binding sources. For example, the following expression contains two binding sources:
<div>{{#user.lastName + ", " + #user.firstName}}</div>
A binding source is a data reference relative to this, so #user.lastName
refers to this.user.lastName
. By default, this refers to the window object. When used inside a view template, this refers to the view controller object (see bind-view).