Skip to content

IE 8 & 9 Index routing issue with angular 1.2.0 #576

Closed
@wlingke

Description

@wlingke

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

$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');

Our index state was defined as such:

.state("index", {
            url: "/",
            templateUrl: "/static/partials/general/index-router.html"
        })

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:

.state("index2", {
            url: "",
            templateUrl: "/static/partials/general/index-router.html"
        })

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions