0
documentation에 설명 된대로 Rivets.js에서 반복 바인딩을 수행하려고했습니다. 그러나 바인딩이 발생하지 않는 것 같습니다. I는이 문제에 대한 fiddle 작성한Rivets.js 컬렉션을 반복 함
var model = {
list: {
todos: [
{ done: true, summary: "Todo 1" },
{ done: false, summary: "Todo 2" }
]
}
}
rivets.bind(document.getElementById('rivets'), model)
:
<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>
바인딩이 수행되어 다음과 같이
템플릿이 정의된다. 내가 뭘 놓치고 있니?