Can you yield block parameters with angle bracket components


#1

Hi,

I’m just playing with the new 2.0 canary build released a little while ago and was wondering if you could yield values with the angle bracket component syntax. And if so, what that would look like.

For example:

Template (my-component)

{{yield "Bob"}}

Use

<my-component as="name">
Hello {{name}}
</my-component>

What an exciting time for Ember!


#2

Nevermind. I looked through the code and found that this is how you take block params:

<my-component as |name|>
Hello {{name}}
</my-component>

Awesome.


#3

Hy.
Where did you find it out ? It doesn’t works for me …