<span trujs-init='$trujs.b = 20'></span> <span trujs-init=''>$trujs.c = 30</span> Name x: <input type='text' trujs-model='x' value=''></input> Name y: <input type='text' trujs-model='y' value='TruJS'></input> Name z: <input type='text' trujs-model='z' value='Fun'></input> Wow! <!-- data binding and expression included --> Name x: <span trujs-bind='x'>$trujs.x</span> <!-- data binding included, but expression not included --> Name y.1: <span trujs-bind='y'></span> <!-- expression included, but no data binding with any model --> Name y.2: <span trujs-bind=''>$trujs.y</span> <!-- data binding not included --> Name y.3: <span >$trujs.y</span> Names x and z: <span trujs-bind='x, z'> var a = 10; $trujs.b++; a + ", " + $trujs.b + ", " + $trujs.c + ", " + $trujs.x + ", " + $trujs.z.toUpperCase(); </span> |
$trujs.c = 30
Name x: Name y: Name z:
Wow!
Name x: $trujs.x Name y.1: Name y.2: $trujs.y Name y.3: $trujs.y Names x and z: var a = 10; $trujs.b++; a + ", " + $trujs.b + ", " + $trujs.c + ", " + $trujs.x + ", " + $trujs.z.toUpperCase() |