ViewportScrollerlink
Manages the scroll position.
静态属性
属性名 | 类型 | 说明 |
---|---|---|
ngInjectableDef |
方法
Configures the top offset used when scrolling to an anchor. | ||
参数
返回值
| ||
When given a tuple with two number, the service will always use the numbers. When given a function, the service will invoke the function every time it restores scroll position. |
Returns the current scroll position. |
参数没有参数。 返回值
|
Sets the scroll position. | ||
参数
返回值
|
Scrolls to the provided anchor. | ||
参数
返回值
|
Disables automatic scroll restoration provided by the browser. See also window.history.scrollRestoration info | ||
参数
返回值
|