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.
An option to have AngularJS leave the URL hash-fragment alone #5529
Open
Description
The $locationProvider
module 'hijacks' the hash-fragment of a URL. This is being done to encode paths for browsers that don't support the HTML5 history API (which is understandable and useful). For example, with html5Mode
disabled:
- A given URL
http://my.domain.com#my-hash
is turned intohttp://my.domain.com/#/my-hash
, and$location.hash()
will be empty.
The problem is that the hash-fragment is still being hijacked when html5Mode
is enabled and a modern browser is used... when there is no path in the URL. For example:
- A given URL
http://my.domain.com#my-hash
is turned intohttp://my.domain.com/my-hash
, and$location.hash()
will still be empty. The hash fragment inhttp://my.domain.com/path#my-hash
, however, is left alone.
I'm not sure whether this is a bug or intentional behavior. But in either case, I would like an option to have AngularJS leave my hash fragment alone altogether.