Skip to content
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

Url malformed on redirect #13

Closed
wespickett opened this issue Aug 10, 2015 · 1 comment
Closed

Url malformed on redirect #13

wespickett opened this issue Aug 10, 2015 · 1 comment

Comments

@wespickett
Copy link

https://github.com/aurelia/history-browser/blob/master/src/index.js#L212

I think there is a bug on that line where 'fragment' should be 'url'. The bug that appears from this is that when I have a redirect route in a route map like:

config.map([
  { route: 'welcome',  moduleId: './welcome',      nav: true, title:'Welcome' },
  { route: '', redirect: 'welcome' }
]);

When I visit the route, '', that redirects, it makes the url look like '/#welcome' instead of '/#/welcome'. (missing a '/' after the '#')

Not sure exactly what the variable 'url' is used for, but it seems to fix it mainly because this.root is appended to it with a value of '/'. Not entirely sure what this.root is used for, so if has some other purpose, then it might just need a static '/' appended to fragment.

@bryanrsmith
Copy link
Contributor

I believe this was resolved by a patch to aurelia/router. I'm not able to reproduce with the current version. Please reopen if I'm mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants