Closed shishirmk closed 10 years ago
have you tried =hb '@index'
?
Yes i have tried it. I got an error Uncaught SyntaxError: Unexpected token , Some people have reported this error in the stackoverflow answer comments.
This is a problem with handlebars.js not hamlbars:
Using the following hamlbars:
= hb 'each widget' do
=hb '@index'
generates:
{{#each widget}}{{@index}}{{/each}}
I suggest you raise an issue on barber or handlebars.
Cheers.
@jamesotron Thanks for taking a look at it
I am planning to use the "@index" used in the first answer to the question in this page http://stackoverflow.com/questions/11884960/how-to-get-index-in-handlebars-each-helper
I get the unexpected token error. So how do i represent that?