cc4d7ee8 by Adam Heath

Add support for each-* creating an {name}_index iteration count;

this is 0-based.  If each-* happens to be given an object, then _index
will contain the key.
1 parent b4813fb7
...@@ -347,6 +347,7 @@ Rivets.binders = ...@@ -347,6 +347,7 @@ Rivets.binders =
347 data = {} 347 data = {}
348 data[n] = m for n, m of @view.models 348 data[n] = m for n, m of @view.models
349 data[@args[0]] = item 349 data[@args[0]] = item
350 data["#{@args[0]}_index"] = i
350 itemEl = el.cloneNode true 351 itemEl = el.cloneNode true
351 if iterated.length > 0 352 if iterated.length > 0
352 previous = iterated[iterated.length - 1].els[0] 353 previous = iterated[iterated.length - 1].els[0]
......