Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Angular directive for smoothly scrolling an element into view

Notifications You must be signed in to change notification settings

boundstate/angular-scroll-to-me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular scroll-to-me

A directive for smoothly scrolling an element into view.

Installation

bower install angular-scroll-to-me

Include smooth-scroll.js and angular-scroll-to-me.js in your HTML:

<script type="text/javascript" src="bower_components/smooth-scroll/dist/js/smooth-scroll.js"></script>
<script type="text/javascript" src="bower_components/angular-scroll-to-me/angular-scroll-to-me.js"></script>

Then load the module in your application by adding it as a dependent module:

angular.module('app', ['boundstate.scrollToMe']);

Usage

The element must have an id specified for the directive to work.

<div id="my-div" scroll-to-me="myVar" offset="0"></div>

About

Angular directive for smoothly scrolling an element into view

Resources

Stars

Watchers

Forks

Packages

No packages published