Yield multiple dynamic params


#1

Hey, I wonder if there’s a way to yield multiple dynamic params from component.

I imagine that would work like that:

{
  arrayData: [1,2]
}

{{#test-component data=arrayData as |one two|}}
  {{one}} //prints one
  {{two}} //prints two
{{/test-component}}

Any ideas how to achieve something like that?


#2

You can yield a hash:

{{#test-component data=arrayData as |stuff|}}
  {{stuff.one}}
  {{stuff.two}}
{{/test-component}}

Would that do what you want?