- {{#items}}
- // is it possible to get index of rendered element right out of the box?
- {{/items}}
Here is the code of helper I use:
- var index = function(expr, options) {
- var result = []
- expr.forEach(function(e, i){
- result.push(options.fn({index: i, item: e }))
- })
- return result.join('')
- }
Is this the only solution for the moment? It could be simpler if Observe.List would supported map method.