title: Cannot get $anchorScroll to work properly with scrollspy
body: <p>Right now I am working on something with angularJS and Bootstrap and for some reason I can't set the offset in $anchorScroll or scrollspy. Right now I am focusing on trying to get $anchorScroll working.</p>
  
  <pre><code>    $anchorScroll.yOffset = 300;
      $scope.gotoAnchor = function(x) {
          console.log("x: ", x);
          var newHash = x;
          if ($location.hash() !== newHash) {
              // set the $location.hash to `newHash` and
              // $anchorScroll will automatically scroll to it
              $location.hash(x);
          } else {
              // call $anchorScroll() explicitly,
              // since $location.hash hasn't changed
              $anchorScroll();
          }
      };
  </code></pre>
  
  <p>But for some reason my yOffset is just ignored! How do I fix this? Why is it being ignored?</p>