$anchorScroll

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–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/service/$anchorScroll

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部