I am using hash-based navigation in my AngularJS app rooted at /
.
If a user navigates to my app like this:
http://example.com/?foo
A moment after the page loads, something (possibly Angular) is causing the address bar to look different than I expected.
What I saw:
http://example.com/?foo#/?foo
What I expected to see:
http://example.com/?foo#/
Why is this happening, and can I turn it off?
I'd wager you need to be in 'html5 mode' to not have the hash fragment... though I'm uncertain.
http://docs.angularjs.org/guide/dev_guide.services.$location
$locationProvider.html5Mode(true).hashPrefix('!');
In your app configuration, you can mess with that config param and it'd probably get rid of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With