Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for 1-based index with the @index_1 psuedo variable #345

Merged
merged 1 commit into from
Jan 23, 2015

Conversation

eliw42
Copy link

@eliw42 eliw42 commented Jan 22, 2015

I'm happy to rename the psuedo variable, but this is a feature that is sorely missed. I went with this syntax Ember uses: http://mozmonkey.com/2014/03/ember-getting-the-index-in-each-loops/. I like this much more than other solutions that involve creating a math helper. Let me know what you think!

Eli

@andersonimes
Copy link

I couldn't find an issue for handlebars.java, but this is an extremely popular feature request for handlebars.js:
handlebars-lang/handlebars.js#250

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.94% when pulling 99887ac on eliw42:master into 9c5ea54 on jknack:master.

@jknack
Copy link
Owner

jknack commented Jan 23, 2015

@eliw42 looks good!

@andersonimes do you mean the +1 index? or the math helper?

@andersonimes
Copy link

+1 index. Math helper would be great too.
On Jan 23, 2015 6:45 AM, "Edgar Espina" notifications@github.com wrote:

@eliw42 https://github.com/eliw42 looks good!

@andersonimes https://github.com/andersonimes do you mean the +1 index?
or the math helper?


Reply to this email directly or view it on GitHub
#345 (comment)
.

@jknack jknack added this to the 2.0.1 milestone Jan 23, 2015
jknack added a commit that referenced this pull request Jan 23, 2015
Adding support for 1-based index with the @index_1 psuedo variable
@jknack jknack merged commit 15e53dd into jknack:master Jan 23, 2015
@eliw42
Copy link
Author

eliw42 commented Jan 23, 2015

Thanks @jknack!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants