Guest User

Untitled

a guest
Apr 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // Code for detecting when the back button is used
  2. $rootScope.$on('$locationChangeSuccess', function() {
  3. $rootScope.actualLocation = $location.path();
  4. });
  5.  
  6. $rootScope.$watch(function () {return $location.path()}, function (newLocation, oldLocation) {
  7. if($rootScope.actualLocation === newLocation) {
  8. $anchorScrollProvider.disableAutoScrolling();
  9. }
  10. });
Add Comment
Please, Sign In to add comment