From ee211b57612a83f5910e41e5c46da7fd104d13f9 Mon Sep 17 00:00:00 2001 From: Jelle Kralt Date: Mon, 3 Aug 2015 10:06:30 +0200 Subject: [PATCH] Added Readme file --- README.md | 34 +++++++++++++++++++++++++++++++++- src/ng-drag-scroll.js | 2 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44d15e3..48ae11c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ -# angular-drag-scroll +# Angular Drag to Scroll Lightweight drag to scroll directive for AngularJS + +## Installation +* Bower: ```bower install angular-drag-scroll --save``` +* Download: you can just download the files from [Github](https://github.com/jellekralt/angular-drag-scroll/archive/master.zip) + +## Usage +* Include ```ng-drag-scroll.js``` in your HTML template: + +```html + + +``` + +* Add a dependency to the ng-drag-scroll module in your application. + +```javascript +angular.module('MyApp', ['ng-drag-scroll']); +``` + +* Add an attribute to an element with a scrollbar to make the content scrollable + +```html +
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

+
+``` + +## Credits / Inspiration +* https://github.com/asvd/dragscroll + +## License +MIT: http://jellekralt.mit-license.org/ \ No newline at end of file diff --git a/src/ng-drag-scroll.js b/src/ng-drag-scroll.js index ad6e92c..8bdece7 100644 --- a/src/ng-drag-scroll.js +++ b/src/ng-drag-scroll.js @@ -2,7 +2,7 @@ 'use strict'; angular - .module('dragscroll') + .module('ng-drag-scroll') .directive('dragScroll', DragScroll); DragScroll.$inject = ['$document', '$window', '$parse'];