JsViews: Data binding

HTML:


...
    <td data-link="firstName"></td>
    <td>
        <input data-link="firstName" />
    </td>
...

Script:

// Get template object
var template = $.templates( "#personTmpl" );

// Render and link: data-link people to the
// details container, using the personTmpl template

template.link( "#details", people );

// Alternative syntax:
//    $.link(template, "#details", people);

Other possible data-binding paths:

<input data-link="{convert:manager.firstName:convertBack} title{:manager.firstName + manager.lastName}" ... />