Skip to content

Commit af53c3e

Browse files
authored
Merge pull request ember-learn#686 from lougreenwood/patch-1
use named args
2 parents 2c3d788 + 7eef5c3 commit af53c3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

guides/release/components/block-params.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ but they can also return output to be used in a block expression.
88
```
99

1010
```handlebars {data-filename=app/templates/components/blog-post.hbs}
11-
{{yield this.post.title this.post.body this.post.author}}
11+
{{yield @post.title @post.body @post.author}}
1212
```
1313

1414
Here an entire blog post model is being passed to the component as a single component property.
@@ -40,11 +40,11 @@ using the `has-block` helper.
4040

4141
```handlebars {data-filename=app/templates/components/blog-post.hbs}
4242
{{#if (has-block)}}
43-
{{yield this.post.title this.post.body this.post.author}}
43+
{{yield @post.title @post.body @post.author}}
4444
{{else}}
45-
<h1>{{this.post.title}}</h1>
46-
<p class="author">Authored by {{this.post.author}}</p>
47-
<p>{{this.post.body}}</p>
45+
<h1>{{@post.title}}</h1>
46+
<p class="author">Authored by {{@post.author}}</p>
47+
<p>{{@post.body}}</p>
4848
{{/if}}
4949
```
5050

0 commit comments

Comments
 (0)