Skip to content

Commit a811aa5

Browse files
committed
fixes and @service store; instead of @service /n store;
1 parent 7cbd3e3 commit a811aa5

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

guides/release/components/actions-and-events.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,7 @@ import Component from '@glimmer/component';
435435
import { inject as service } from '@ember/service';
436436

437437
export default class SendMessage extends Component {
438-
@service
439-
messaging;
438+
@service messaging;
440439

441440
// component implementation
442441
}
@@ -483,8 +482,7 @@ import { inject as service } from '@ember/service';
483482
import { action } from '@ember/object';
484483

485484
export default class UserProfile extends Component {
486-
@service
487-
login;
485+
@service login;
488486

489487
@action
490488
userDidDeleteAccount() {
@@ -528,17 +526,16 @@ adding JavaScript code to those child components.
528526
For example, say we want to move account deletion from the `UserProfile`
529527
component to its parent `system-preferences-editor`.
530528

531-
First we would move the `deleteUser` action from `user-profile.js` to the
532-
actions object on `system-preferences-editor`.
529+
First we would move the `deleteUser` action from `user-profile.js` to
530+
the parent `system-preferences-editor.js`.
533531

534532
```javascript {data-filename=app/components/system-preferences-editor.js}
535533
import Component from '@glimmer/component';
536534
import { inject as service } from '@ember/service';
537535
import { action } from '@ember/object';
538536

539537
export default class SystemPreferencesEditor extends Component {
540-
@service
541-
login;
538+
@service login;
542539

543540
@action
544541
deleteUser(idStr) {
@@ -548,7 +545,7 @@ export default class SystemPreferencesEditor extends Component {
548545
```
549546

550547
Then our `system-preferences-editor` template passes its local `deleteUser`
551-
action into the `UserProfile` as that component's `deleteCurrentUser` property.
548+
action into the `UserProfile` as that component's `deleteCurrentUser` argument.
552549

553550
```handlebars {data-filename=app/templates/components/system-preferences-editor.hbs}
554551
<UserProfile

0 commit comments

Comments
 (0)