Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Live binding to an array inside an object

$
0
0
CanJS has it's own iterator, so a Dom library agnostic implementation is 

  1. <% can.each(this.attr("pets"), function(pet, index) { %>
  2. <span <%= (el) -> can.data(el, "pet", index) %>><%= pet %></span>
  3. <% }); %>

Viewing all articles
Browse latest Browse all 3491

Trending Articles