We have a project which uses Angular, but only for the UI binding/AJAX aspect of it, not for any sort of routing or SPA functionality.
We want to be able to use anchor links (
As somewhat of a workaround (and certainly not best practice), I ended up modifying the Angular source in order to remove the URL rewriting.
I made a few changes, but I believe the one that caused anchor links to work again was adding a
return; statement on Line 844 of
location.js in the Angular source:
This short-circuits around much of the URL rewriting functionality.
I also completely removed Lines 262-264 of
browser.js, which removes Angular's hook on the
This didn't seem to affect any of the binding features of Angular, but it did cause anchor links to start working again.