I have a #each loop in my ember application and want to know the loop index, so I am trying to use {{@index}} as follows:
<script type="text/x-handlebars" data-template-name="column"> <ul> {{#each item in controller}} {{@index}} {{item-rows currentItem=item}} {{/each}} </ul> </script>
But in chrome, I get this error:
Uncaught SyntaxError: Unexpected token , handlebars.js:1457
My version of ember.js is rc8 and handlebars is 1. I need a solution to find the #each index.
source share