Skip to content

Support for BlockParams#335

Closed
oformaniuk wants to merge 2 commits intoHandlebars-Net:masterfrom
oformaniuk:blockParams-support
Closed

Support for BlockParams#335
oformaniuk wants to merge 2 commits intoHandlebars-Net:masterfrom
oformaniuk:blockParams-support

Conversation

@oformaniuk
Copy link
Member

@oformaniuk oformaniuk commented Jan 12, 2020

The PR introduces support of BlockParams syntax (#301, mentioned in #294):
{{#each enumerateMe as |item id|}}{{@item}}: {{@id}} {{/each}}
P.S. supports both @item and item syntax for referring param.

The implementation was guided by emberjs/rfcs/pull/3

Where supported:

  • #each:
    • object iterators: first param maps to @value, second to @key
    • enumerable iterators: first param maps to @value, second to @index
  • #with
  • custom helpers via configuring with call to options.BlockParams(...)

Notes:
Implementation done in a way to potentially support more keywords then just as (in case more would be added in the future) but strictly limited to support only it for now.

@oformaniuk oformaniuk requested a review from rexm January 15, 2020 22:50
@oformaniuk
Copy link
Member Author

May be ignored in case /pull/352 is merged.

@oformaniuk oformaniuk closed this Aug 28, 2020
@oformaniuk oformaniuk deleted the blockParams-support branch November 21, 2020 21:42
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

Successfully merging this pull request may close these issues.

1 participant