-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/navigation with root #41
base: master
Are you sure you want to change the base?
Conversation
@davismj Can you review this please? |
I need to play around with this in a live application, specifically with push state and non push-state and make sure that the behaviors match. I'm guessing the assessment is correct but I do want to double check.
I've recently made some changes that affect the way links are generated. I have a feeling this issue might be fixed. |
Let me know if I can help you in any way. I’ve had my changes to |
For outbound link, use |
@huochunpeng Your suggestion would require me to annotate all links that might ever be part of any page, including user-added content. Breaking regular HTML is not an option. |
I see. For user created content, I guess probably we can support something like this. <div class="router-ignore">
<a></a>
</div> |
This is part of a patch for both
aurelia-history-browser
andaurelia-router
and contains two bugfixes related to havingroot
set to something else than/
.1. History could not handle outbound links
If
root
is set, eg., to/app1
, the following link causes a routing error instead of navigating away from the app:< a href="/app2">Outbound link</a>
.This is fixed in 407959e.
2. History did not handle absolute paths within the app correctly
The router ignored
root
when creating URLs. This caused all non-default click actions (eg. CMD+Click, Right-click-> "Open in new Tab/Browser", etc.) to navigate to the wrong URL. (And broke links for crawlers.)But as soon as the router creates correct URLs, history’s lack of proper
root
support causes all navigations to fail. This is fixed in bfad456.