From 5dcf9bb4feb144b3a54a43524210dd7d0bb4213e Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 3 Apr 2010 20:19:55 -0700 Subject: browser is now injectable into the system --- src/services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/services.js') diff --git a/src/services.js b/src/services.js index 59c21d36..16b48031 100644 --- a/src/services.js +++ b/src/services.js @@ -24,9 +24,9 @@ angularService("$location", function(browser){ } } var hashKeyValue = toKeyValue(location.hashSearch); - return location.href + - (location.hashPath ? location.hashPath : '') + + var hash = (location.hashPath ? location.hashPath : '') + (hashKeyValue ? '?' + hashKeyValue : ''); + return location.href.split('#')[0] + '#' + (hash ? hash : ''); } browser.watchUrl(function(url){ location(url); -- cgit v1.2.3