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

How to reference Handlebars builtin helper each's count @index in emblem #112

Closed
jonakyd opened this issue Dec 5, 2013 · 11 comments
Closed

Comments

@jonakyd
Copy link

jonakyd commented Dec 5, 2013

from handlerbars doc

When looping through items in each, you can optionally reference the current loop index via {{@index}}

{{#each array}}
  {{@index}}: {{this}}
{{/each}}

how do I use @index in emblem?

@jaketrent
Copy link

+1. I'd love to know.

@AlexTatarnikov
Copy link

+1

@lai
Copy link
Contributor

lai commented Jan 21, 2014

Need to know as well.

@machty
Copy link
Owner

machty commented Jan 21, 2014

I bet it's not supported yet! Who wants to add it? I don't think this would be too crazy difficult if someone wanted to take a swing at it, but I'm crazy busy atm (and selfishly want to encourage contributors :)

@patrickjholloway
Copy link
Contributor

I'd be happy to take a stab at it this weekend.

@patrickjholloway
Copy link
Contributor

Looks like this isn't supported in Ember yet either. emberjs/ember.js#3030
Is this still on the docket?

@machty
Copy link
Owner

machty commented Feb 17, 2014

@patrickjholloway it's not in ember but lots of people use emblem for raw handlebars, so we should support it (And it might get added to ember at some point)

@patrickjholloway
Copy link
Contributor

@machty Sounds good, I didn't realize that people were using it for raw handlebars. I worked on this a bit last night and should have a pull request ready soon.

@lai
Copy link
Contributor

lai commented Apr 13, 2014

Do we know if supporting @key for object iteration would be trivial now that we have @index? Not having @key is the only reason I still have to resort to the much more verbose handlebars.

@lai
Copy link
Contributor

lai commented Apr 15, 2014

I totally need @key support in emblem right now. PR coming soon.

@machty
Copy link
Owner

machty commented Apr 16, 2014

Closed by #150

@machty machty closed this as completed Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants