File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
guides/release/components Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ but they can also return output to be used in a block expression.
8
8
```
9
9
10
10
``` 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}}
12
12
```
13
13
14
14
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.
40
40
41
41
``` handlebars {data-filename=app/templates/components/blog-post.hbs}
42
42
{{#if (has-block)}}
43
- {{yield this. post.title this. post.body this. post.author}}
43
+ {{yield @ post.title @ post.body @ post.author}}
44
44
{{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>
48
48
{{/if}}
49
49
```
50
50
You can’t perform that action at this time.
0 commit comments