0
我试图在documentation中描述的Rivets.js中执行迭代绑定。但似乎没有绑定发生。Rivets.js遍历集合
模板定义如下:
var model = {
list: {
todos: [
{ done: true, summary: "Todo 1" },
{ done: false, summary: "Todo 2" }
]
}
}
rivets.bind(document.getElementById('rivets'), model)
我创建了针对此问题的fiddle:
<section id="rivets">
<ul>
<li data-each-todo="list.todos">
<input type="checkbox" data-checked="todo.done">
<span data-text="todo.summary"></span>
</li>
<ul>
</section>
的结合是由执行。我错过了什么?