I have an app that relies on the URL fragment being #moved
. A piece of JS code picks that up and reminds the user to update her bookmark:
if (window.location.hash === '#moved') {
window.location.hash = "";
history.pushState('', document.title, window.location.pathname);
show_notification();
}
Now a test fails because after introducing Angular (stable version, 1.0.8), #moved
is being rewritten to #/moved
. (I'm injecting $location
into my controller, but I'm not sure if that's what's causing the behavior.)
I could just change the condition, but I was curious why Angular does that and how to avoid it?