tag jbind
<input jbind="variable"/>
is only suit for input or textarea element, when the value changed ininput
ortextarea
element , the variable in scope will also be synced.
as attribute
1 <input
2 jbind="variable">
3 ...
4 </input>
@fn
Example
1 {{ msg }}
2 {{ msg }}
3 {{ msg }}
1 <div scope="testBind">
2 <input type="text" jbind="msg">
3 <p>1 {{ msg }}</p>
4 <p>2 {{ msg }}</p>
5 <p>3 {{ msg }}</p>
6 </div>
1 define('testBind',function(exports,require,module){
2 exports.msg = "jbind works";
3 });