Skip to content

Calling replaceWith instead of transitionTo #99

@buschtoens

Description

@buschtoens

The {{link-to}} component allows you to invoke it with replace=true, which causes it to not call transitionTo, but replaceWith instead. Like this:

{{#link-to "some.route" replace=true}}
  Link Text
{{/link-to}}

Would be nice, if we could do the something similar with {{href-to}}. Since the helper can't attach meta info to the <a> tag, we can't do it as a named param for the helper. Instead I propose allowing users to set a data-href-replace attribute on the tag, kinda like we already do for ignoring links:

isNotIgnored() {
return !this.target.attributes['data-href-to-ignore'];
}

So this would look like

<a href={{href-to "some.route"}} data-href-replace>
  Link Text
</a>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions