Skip to content

Commit

Permalink
fix($location): $locationchangesuccess not fires with browser back wh…
Browse files Browse the repository at this point in the history
…en path ends with '/#'. angular#12175
  • Loading branch information
rrsivabalan committed Sep 15, 2015
1 parent 9e6a9b9 commit 6815946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6815946

Please sign in to comment.