Skip to content

Opening url in new tab results in error when the config.options.root is set #457

@fracz

Description

@fracz

I'm submitting a bug report

  • Library Version:
    1.1.1

Current behavior:
When router is configured with root path, e.g.

configureRouter(config: RouterConfiguration, router: Router) {
    config.options.root = '/some-root';
    // ...
}

Then the following link correctly instructs aurelia-router to open /some-root/some-page:

<a href="/some-page">Some page</a>

However, when the link is clicked with middle mouse button (open in new tab), it opens new tab with /some-page url instead of /some-root/some-page.

When I include the root path in the link

<a href="/some-root/some-page">Some page</a>

then aurelia tells me there is no such route and redirects to /some-root/some-root/some-page but middle-button click works.

Expected/desired behavior:
Aurelia should accept links with root inside href and ignore it. The href of navigation items from router.navigation should also contain the root path.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions