-
Notifications
You must be signed in to change notification settings - Fork 3k
When using "base href" ui-router generates wrong urls #638
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
Comments
if you're not worried about xss, you could generate the location via generated script by the server aswell |
What happens if you remove the slash from the state declaration? |
same issue here |
@dlukez If you remove the slash, the URL generated is correct. However, the URL routing breaks because it can no longer match that route. |
Having the same issue |
Can you show me a page that demonstrates the issue? |
Will be fixed in next release by #528 |
@timkindberg |
Couple weeks? |
Ok. That's probably too long for us to wait. I'll have to see if I can patch v0.2.8 with this fix and use that until the next release. |
@Guuz Two hours ago. |
Thanks! That's a pretty good estimate ;-) |
I am not sure you have the same problem as I do, but this issue ruined my day, and after hours of trying to fix it beautiful I used this workaround http://stackoverflow.com/questions/34211894/angular-ui-router-ui-sref-links-arent-prepending-the-hash-when-filling-in-href/34775725#34775725 |
Proper urls are not generated properly by
ui-sref
when<base href="/foo/bar/" />
is present.My angular app is hosted in the
foo/bar
directory.In my
index.html
:my routes are like:
and here is how I reference the state in the template:
And instead of outputting:
I get (note the slash):
The text was updated successfully, but these errors were encountered: