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>
的結合是由執行。我錯過了什麼?