Skip to content

LinkComponent cannot be yielded as a contextual component #14508

@phcoliveira

Description

@phcoliveira

First of all, I did look at StackOverflow before creating this issue. As a matter of fact, I could not find anything about this, and I am pretty sure that I am not the only one who tried this.

{{!-- components/a-component/template.hbs --}}
{{yield (hash
  contextual-link=(component "link-to" class="a-component__contextual-link")
}}
{{!-- END --}}

{{!-- somewhere else --}}
{{#a-component as |component|}}
  {{#component.contextual-link "some.route"}}
    Unfortunately, this does not work.
  {{/component.contextual-link}}
{{/a-component}}
{{!-- END --}}

When used like that, LinkComponent will complain the it needs at least one parameter. When one bogus parameter is supplied in the template of a-component, such as "application", it won't be replaced by the time the contextual-link is invoked.

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions