-
Notifications
You must be signed in to change notification settings - Fork 3k
$locationProvider.html5Mode(true) broken #2032
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
Seems like it should work. Pretty surprising since it's such a commonly-used feature. Can anybody else confirm this? |
I can confirm this exists. |
It is not only ui-router issue, I get it just by doing $locationProvider.html5Mode(true) without any ui-router. |
So if you take out all traces of ui-router its still happening? |
Yes, I do not use ui-router at all. |
I have just tried this workaround: ...and it seems to be working. Still checking... |
I am inclined to close this issue then. @kikar if you take out ui-router do you still have the bug? |
Seems to be an Angular problem. Don't have bug anymore |
Still broken. Quick fix: app.run(function ($browser) {
$browser.baseHref = function () { return "/" };
}); |
Yeah, still have this problem |
@moander's solution works but all you have to do is change More info on this SO post: http://stackoverflow.com/questions/17768814/ngroute-set-base-url-for-all-routes |
thanks moander's solution ,fixed by |
@cleechtech is right. All you have to make sure is that the value for Wrong: Right: |
So I had this problem also. What I discovered was that I was using Update: |
Finally I got a way to to solve this issue by server side as it's more like an issue with AngularJs itself I am using 1.5 Angularjs and I got same issue on reload the page.
|
I used Express with no parameters to generate a quick server that will serve these 2 files:
Using UIRouter 0.2.14 and AngularJS 1.3.16 and I get this error twice in console:
Works normally when setting html5Mode to false, or when I comment that line.
The text was updated successfully, but these errors were encountered: