ember-command icon indicating copy to clipboard operation
ember-command copied to clipboard

LinkCommand to accept a Link instance

Open gossi opened this issue 4 years ago • 0 comments

Allow this to work:

class MyComponent extends Component {
  link = this.linkMananger.createLink({...});

  @command = commandFor([new LinkCommand(this.link)]);
}

which would enable this:

{{! invocation }}
<MyComponent @link={{link "..."}}/>
{{! template.hbs

<Button @push={{this.go}}>let's go</Button>

and

interface Args {
  link: Link;
}

class MyComponent extends Component<Args> {
  @command
  go = commandFor([
    new LinkCommand(this.args.link),
    new OtherCommand()
  ]);
}

gossi avatar Aug 04 '21 12:08 gossi