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

$location shouldn't rewrite the browser's location on URL change #8943

Closed
laurentgoudet opened this issue Sep 5, 2014 · 1 comment
Closed

Comments

@laurentgoudet
Copy link

We're trying to introduce Angular into a legacy code base composed of various backbone apps using client side routers, i.e. relying on a specific location.hash to show a state.

No routing is done by Angular, however injecting/using the $location service rewrite the location hash (on a URL change) to add a forward '/' (https://github.com/angular/angular.js/blob/master/src/ng/location.js#L45), breaking our legacy apps.

Commenting these 2 lines of code seems to work for us but I'm guessing they must be there for a reason. On the other hand, modifying our apps will break all the links to these pages (http://site.com/section/#!info -> http://site.com/section/#/!info), internals (easy to miss some) & externals (can't even change them). Thoughts?

@btford
Copy link
Contributor

btford commented Sep 8, 2014

This is a duplicate of #4608. Closing. Feel free to join the discussion in the other issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants