Skip to content

Commit 8a42b3b

Browse files
DanMonroekategengler
authored andcommitted
[DOC lts] Addressed PR comments
(cherry picked from commit 5c9b6e1)
1 parent 71c2fe5 commit 8a42b3b

4 files changed

Lines changed: 21 additions & 5 deletions

File tree

packages/@ember/-internals/glimmer/lib/component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ export const BOUNDS = symbol('BOUNDS');
4545
```app/templates/components/my-foo.hbs
4646
<PersonProfile @person={{this.currentUser}} />
4747
```
48+
4849
or
4950
5051
```app/templates/components/my-foo.hbs
51-
{{person-profile person=currentUser}}
52+
{{person-profile person=this.currentUser}}
5253
```
5354
5455
```app/templates/components/person-profile.hbs
@@ -68,9 +69,10 @@ export const BOUNDS = symbol('BOUNDS');
6869
{{! Executed in the controller's context. }}
6970
</PersonProfile>
7071
```
72+
7173
or
7274
```handlebars
73-
{{#person-profile person=currentUser}}
75+
{{#person-profile person=this.currentUser}}
7476
<p>Admin mode</p>
7577
{{! Executed in the controller's context. }}
7678
{{/person-profile}}
@@ -474,7 +476,9 @@ export const BOUNDS = symbol('BOUNDS');
474476
<h3>Fisherman Industries</h3>
475477
</PersonProfile>
476478
```
479+
477480
or
481+
478482
```handlebars
479483
{{#person-profile}}
480484
<h2>Chief Basket Weaver</h2>

packages/@ember/-internals/glimmer/lib/helpers/component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@
112112
113113
```
114114
<PersonForm as |form|>
115-
{{form.nameInput placeholder="Username"}}
115+
<form.nameInput @placeholder={{"Username"}} />
116116
</PersonForm>
117117
```
118+
118119
or
119120
```
120121
{{#person-form as |form|}}

packages/@ember/-internals/glimmer/lib/helpers/if-unless.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ class ConditionalHelperReference extends CachedReference {
118118
You can use the `if` helper inside another helper as a nested helper:
119119
120120
```handlebars
121-
<SomeComponent height=(if isBig "100" "10") />
121+
<SomeComponent height={{if isBig "100" "10"}} />
122122
```
123+
124+
or
125+
123126
```handlebars
124127
{{some-component height=(if isBig "100" "10")}}
125128
```
@@ -154,8 +157,11 @@ export function inlineIf(_vm: VM, { positional }: Arguments) {
154157
You can use the `unless` helper inside another helper as a subexpression.
155158
156159
```handlebars
157-
<SomeComponent height=(unless isBig "10" "100") />
160+
<SomeComponent height={{unless isBig "10" "100"}} />
158161
```
162+
163+
or
164+
159165
```handlebars
160166
{{some-component height=(unless isBig "10" "100")}}
161167
```

packages/@ember/-internals/glimmer/lib/helpers/mut.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import { INVOKE, UPDATE } from '../utils/references';
1515
```handlebars
1616
<MyChild @childClickCount={{action (mut totalClicks)}} />
1717
```
18+
19+
or
20+
1821
```handlebars
1922
{{my-child childClickCount=(mut totalClicks)}}
2023
```
@@ -40,7 +43,9 @@ import { INVOKE, UPDATE } from '../utils/references';
4043
```handlebars
4144
<MyChild @childClickCount={{this.totalClicks}} @click-count-change={{action (mut totalClicks))}} />
4245
```
46+
4347
or
48+
4449
```handlebars
4550
{{my-child childClickCount=totalClicks click-count-change=(action (mut totalClicks))}}
4651
```

0 commit comments

Comments
 (0)