After adding the statement $location.hash('tab1');
, I expected the URL to change to '/#tab1' but it becomes '/#/#tab1'.
What is causing the extra '#/' to appear and how can I avoid it?
UPDATE:
To clarify, I do not want to remove the hash from the fragment URL but the empty path. Per my syntax $location.hash('tab1');
, I expected the browser URL to become '/#tab1' but it became '/#/#tab1'.
The extra '#/' is caused by $locationProvider configuration. It can be removed by
$locationProvider.html5Mode(true)