Skip to content
Sarsa Parilla edited this page Feb 17, 2022 · 3 revisions

The bind-event directive is the databinding equivalent of inline event handlers. Instead of onclick, you use bind-event-click.

<div bind-repeater-i="#todos.length">
    <input type="checkbox"
        bind-event-change="#todos[#i].done = thisElem.checked">

    <span>{{#todos[#i].text}}</span>

    <input type="button" value="Delete"
        bind-event-click="#todos.splice(#i,1); doSomethingElse(event)">
</div>

http://jsfiddle.net/wcoczs50/1/

Clone this wiki locally