Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

IE9 (and 8?) reloads page on link with ng-click if $location is injected #1179

Closed
@mna

Description

@mna

As discussed here on google groups, Leo Cavalcante points out that when the $location dependency is injected, IE8-9 acts strangely and somehow reloads the page, instead of preventing the default action as is expected on a click on an anchor with the ng-click directive. I forked his fiddle and made another one which shows the problem in a more obvious way:

http://jsfiddle.net/Tg2Hs/5/

On initial run, the value in the textbox is 'initial', then after the click on the link it gets changed to 'test', but is reverted back to 'initial' automatically because of this bug. If we remove the $location dependency and re-run the fiddle, it works as expected. I don't have IE8, but I have this problem on IE9 / Win7.

Hopefully this is not a duplicate, I did check the issues marked as bugs and did not find this.

Martin

EDIT: This is with AngularJS 1.0.1 by the way, as can be seen in the fiddle.

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