aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/location.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/location.js')
-rw-r--r--src/service/location.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/service/location.js b/src/service/location.js
index d0ae9de7..3e8ba0c3 100644
--- a/src/service/location.js
+++ b/src/service/location.js
@@ -530,8 +530,10 @@ function $LocationProvider(){
// update $location when $browser url changes
$browser.onUrlChange(function(newUrl) {
if (currentUrl.absUrl() != newUrl) {
- currentUrl.$$parse(newUrl);
- $rootScope.$apply();
+ $rootScope.$evalAsync(function() {
+ currentUrl.$$parse(newUrl);
+ });
+ if (!$rootScope.$$phase) $rootScope.$digest();
}
});