Skip to content
New issue

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

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

Already on GitHub? # to your account

Document #each list as |blah| etc #1025

Closed
rclai opened this issue May 12, 2015 · 4 comments
Closed

Document #each list as |blah| etc #1025

rclai opened this issue May 12, 2015 · 4 comments
Labels
Milestone

Comments

@rclai
Copy link

rclai commented May 12, 2015

Wouldn't it be incredibly valuable to document this use of #each? It would really be a great alternative (and less of an eye-sore) than to have to do ../parentField, especially when nesting #each's.

@kpdecker kpdecker modified the milestones: Backlog, Next May 22, 2015
@kpdecker
Copy link
Collaborator

Looks like we missed these docs when implementing. We should document this. Anyone who wants to take a crack at this, the best location is somewhere around here:
https://github.com/wycats/handlebars-site/blob/master/src/pages/builtin_helpers.haml#L133

@zordius
Copy link

zordius commented May 23, 2015

A small question, the |foo bar| is only valid for #each , or we can think it is a generic array syntax for all custom helper? For example maybe we can do this: {{#myLoop |a b c|}} and it should be cool.

@kpdecker
Copy link
Collaborator

Any helper can use providing they pass the proper args. I'm not in front of
a computer right now but the each impl should provide example.
On Fri, May 22, 2015 at 8:07 PM Zordius notifications@github.com wrote:

A small question, the |foo bar| is only valid for #each , or we can think
it is a generic array syntax for all custom helper? For example maybe we
can do this: {{#myLoop |a b c|}} and it should be cool.


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

@kpdecker
Copy link
Collaborator

We also need to improve the documentation on how to write helpers for block parameters as well. @ErisDS has a good high level summary in #907 that covers a lot of the things that we will need to document.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants