You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
In IE9, with hashbang mode enabled, and having injected the $location service (not just configured the provider), an anchor with an ng-click but no href causes an exception when clicked:
Unable to get the value of the property 'indexOf': object is null or undefined
To reproduce, put this in a file named ie9 and run python -m SimpleHTTPServer 5000, then visit http://localhost:5000/ie9/.
Note that you must inject $location to see the issue; the offending line is in $location and is only run when the service is instantiated.
There are several ways to "solve" the problem, but I'm not sure which is best. It seems that the implementation of the a (anchor) directive could stopPropagation as well as preventing default, or we could simply check for empty/undefined href attributes at that point in $location.