Skip to main content
Minor grammar and code formatting
Source Link
Drewness
  • 5.1k
  • 4
  • 35
  • 51

inIn my case, I noticed that the routing logic was kicking in if I modified the location hash$location.hash(). theThe following trick worked..

$scope.scrollTo = function(id) { var old = $location.hash(); $location.hash(id); $anchorScroll(); //reset to old to keep any additional routing logic from kicking in $location.hash(old); }; 

in my case I noticed that the routing logic was kicking in if I modified the location hash. the following trick worked..

$scope.scrollTo = function(id) { var old = $location.hash(); $location.hash(id); $anchorScroll(); //reset to old to keep any additional routing logic from kicking in $location.hash(old); }; 

In my case, I noticed that the routing logic was kicking in if I modified the $location.hash(). The following trick worked..

$scope.scrollTo = function(id) { var old = $location.hash(); $location.hash(id); $anchorScroll(); //reset to old to keep any additional routing logic from kicking in $location.hash(old); }; 
Source Link
slugslog
  • 1.7k
  • 1
  • 10
  • 10

in my case I noticed that the routing logic was kicking in if I modified the location hash. the following trick worked..

$scope.scrollTo = function(id) { var old = $location.hash(); $location.hash(id); $anchorScroll(); //reset to old to keep any additional routing logic from kicking in $location.hash(old); };