@@ -435,8 +435,7 @@ import Component from '@glimmer/component';
435
435
import { inject as service } from ' @ember/service' ;
436
436
437
437
export default class SendMessage extends Component {
438
- @service
439
- messaging;
438
+ @service messaging;
440
439
441
440
// component implementation
442
441
}
@@ -483,8 +482,7 @@ import { inject as service } from '@ember/service';
483
482
import { action } from ' @ember/object' ;
484
483
485
484
export default class UserProfile extends Component {
486
- @service
487
- login;
485
+ @service login;
488
486
489
487
@action
490
488
userDidDeleteAccount () {
@@ -528,17 +526,16 @@ adding JavaScript code to those child components.
528
526
For example, say we want to move account deletion from the ` UserProfile `
529
527
component to its parent ` system-preferences-editor ` .
530
528
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 ` .
533
531
534
532
``` javascript {data-filename=app/components/system-preferences-editor.js}
535
533
import Component from ' @glimmer/component' ;
536
534
import { inject as service } from ' @ember/service' ;
537
535
import { action } from ' @ember/object' ;
538
536
539
537
export default class SystemPreferencesEditor extends Component {
540
- @service
541
- login;
538
+ @service login;
542
539
543
540
@action
544
541
deleteUser (idStr ) {
@@ -548,7 +545,7 @@ export default class SystemPreferencesEditor extends Component {
548
545
```
549
546
550
547
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 .
552
549
553
550
``` handlebars {data-filename=app/templates/components/system-preferences-editor.hbs}
554
551
<UserProfile
0 commit comments