Skip to content

peterpme/ng-smooth-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Smooth Scrolling Directive

An AngularJS directive that makes scrolling seamless on your page.

Browser Support

  • Chrome, Safari, Opera, FireFox, IE

Install

Clone the repository and include directly into your project. You can also use bower and install as a dependency:

bower install ng-smooth-scroll --save

Add the dependency in your Angular's project dependency arguments:

var app = angular.module('MyApp', [
  'ng-smooth-scroll'
]);

Make sure you reference the script in your javascript:

<script src="bower_components/ng-smooth-scroll/ng-smooth-scroll.js"></script>

** Note: Currently, I am adding data-ng-smooth-scroll to my html class, like below. I don't necessarily link this, but will try and come up with a better implementation. **

<html ng-app='example' data-ng-smooth-scroll>

Usage

ng-smooth-scroll looks for the target href and a class on the link you're looking for, ex. `scroll-to'

Example:

<a href='#one' class='scroll-to'>One</a>
<a href='#two' class='scroll-to'>Two</a>

About

AngularJS directive that delivers smooth scrolling to your application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published