-
Notifications
You must be signed in to change notification settings - Fork 3k
IE 8 & 9 Index routing issue with angular 1.2.0 #576
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
Are you navigating to the state via a ui-sref? There is already a bug for that: see #350. As far as needing to use "" instead of '/' that actually makes sense and isn't really a work around. |
I'm navigating to it via a normal link and not ui-sref.
However, If I remove the href attribute and use ui-sref="index", I get the same double load result. If I use ui-sref="index2" nothing happens when I click on the link. |
Can you make a plunkr with the issue showing in IE? |
http://plnkr.co/edit/aMFwBw The behavior you should see is every time you toggle from route1 to home, the counter should go up by 1. So you'll start at 1, click route1, then click home and you should see 2. Repeat this again and you'll see 3. This is the case in Chrome, FF, IE10 In IE 8 and 9, if you try this, you'll start at 1. Then after you click route 1 and home, you'll see 2 briefly and it'll reload to 1. |
I just came across this same issue. Adding the second index with an empty url fixed my issue in IE, though I hope for a better perm solution. |
This worked for me: $urlRouterProvider.when('', '/'); |
Seconded that $urlRouterProvider.when('', '/'); worked for me. |
the $urlRouterProvider.when('', '/'); trick is handy, but breaks down if you have query string parameters in the root state, so I had to do the duplicated state definition. This seems like a breaking change from upstream, so the question is whether it was an intentional feature, or an unintentional bug, and how ui-router should respond to it. |
Is $urlRouterProvider.when('', '/') the only solution here? it feels weird because there's actually an ending "/" in the URL in IE 8 & 9. |
We are using ui-router 0.2.0 and we recently upgraded from angular 1.1.4 to angular 1.2.0 and noticed a weird issue. We are using
Our index state was defined as such:
This work correctly in chrome FF and IE10. However, when navigating to / in IE 9 or 8, it loads a blank page. I added an alert onEnter, and the alert doesn't execute so it seems like I never reach that state. This was not an issue and was properly working before we upgraded to angular 1.2.0.
A work around we used was adding:
This solved the problem and we are able to reach / in ie 9 or 8. However, an odd result is that when navigating to / from another state, it executes the state twice (we also added an onEnter alert and it executed twice).
Has anyone else come across a similar issue?
The text was updated successfully, but these errors were encountered: