angular-scrollto

Angular directive to scroll to element by selector.

Module License: MIT

Added by: Sam Deering

GitHub

Repository

scottcorgan/angular-scrollto

Stats

Stars: 48

Watchers: 48

Forks: 12

Module Description

angular-scrollto

Angular directive to scroll to element by selector.

Requires jQuery. Soon, there will be a non-jQuery version as well.

Install

Bower

bower install angular-scrollto --save

NPM

npm install angular-scrollto --save

Usage

Inject module

angular.module('myApp', ['scrollto']);

Use as directive

<a href="" scroll-to="#element" offset="0" container="html, body">Go to element</a>

<div id="element">
  You will scroll to me
</div>

Options

scroll-to

Requred

Element to scoll to when current element is clicked.

offset

Default value: 0

Number of pixels to offset from the top.

duration

Default value: 150

Length of time, in milliseconds, the animation will take.

container

Default value: html, body

The container element to scroll.

Module stats last updated: 2017-09-30 16:00:04

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!