$anchorScroll
(service in module ng
)
When called, it checks current value of $location.hash()
and scroll to related element,
according to rules specified in
Html5 spec.
It also watches the $location.hash()
and scroll whenever it changes to match any anchor.
This can be disabled by calling $anchorScrollProvider.disableAutoScrolling()
.
$anchorScroll();