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.
Weird Interaction with $location.hash() and Chrome/Firefox #10659
Closed
Description
When I enter the following into Chrome
http://www.example.com/enter/contest#top
it turns into
http://www.example.com/enter/contest/#top
This also happens when just running $location.hash("top")
without any hashes in the URL.
This causes $location.hash()
to be ""
. I need this check because if I do $location.hash("top")
in any repeated function I get #top#top
. I have a simple "is it already 'top'
if check but since chrome messes with the url, it's always blank.
$location.hash("top");
$anchorScroll();
makes the url fwiw
http://www.example.com/enter/contest/#top#top
Any ideas of a work around?