diff --git a/src/ng/location.js b/src/ng/location.js index a904b100b7c6..3c878f513a0d 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -922,12 +922,12 @@ function $LocationProvider() { $location.$$parse(newUrl); $location.$$state = newState; - defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, + defaultPrevented = $rootScope.$broadcast('$locationChangeStart', trimEmptyHash(newUrl), oldUrl, newState, oldState).defaultPrevented; // if the location was changed by a `$locationChangeStart` handler then stop // processing this location change - if ($location.absUrl() !== newUrl) return; + if ($location.absUrl() !== trimEmptyHash(newUrl)) return; if (defaultPrevented) { $location.$$parse(oldUrl);