Improve this Doc View Source $anchorScroll

  1. service in module ng

When called, it checks current value of $location.hash() and scrolls to the related element, according to rules specified in Html5 spec.

It also watches the $location.hash() and scrolls whenever it changes to match any anchor. This can be disabled by calling $anchorScrollProvider.disableAutoScrolling().

Dependencies

Usage

$anchorScroll();

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/service/$anchorScroll