Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wzr1337/bower-angular-momentum-scroll
bower repo for angular-momentum-scroll
https://github.com/wzr1337/bower-angular-momentum-scroll
Last synced: 2 months ago
JSON representation
bower repo for angular-momentum-scroll
- Host: GitHub
- URL: https://github.com/wzr1337/bower-angular-momentum-scroll
- Owner: wzr1337
- License: mit
- Created: 2013-04-16T19:51:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-20T12:36:39.000Z (almost 9 years ago)
- Last Synced: 2024-10-10T11:42:25.525Z (3 months ago)
- Language: JavaScript
- Size: 118 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE.md
Awesome Lists containing this project
README
# angular-momentum-scroll
AngularJS directive that adds momentum scroll via iScroll (http://cubiq.org).
## Demo
Find a demonstration on http://wzr1337.github.com## Usage
* Include `scrollable.js` or `scrollable.min.js` into your page
* Declare `'angular-momentum-scroll'` as a dependency for your angular app: `angular.module('myApp', ['angular-momentum-scroll']);`
* Add the `scrollable` attribute to a container of your choice:
* the container MUST have set width and height !!
* in order to scroll horizontally the .scroller class inside of your container MUST have set width and height !!
* The container takes an additional attribute `parameters` according to iScroll docs. e.g.
```javascript
* You can register any of the following handlers by specifying a callback function via attribute:
* onRefresh
* onBeforeScrollStart
* onScrollStart
* onBeforeScrollMove
* onScrollMove
* onBeforeScrollEnd
* onScrollEnd
* onTouchEnd
* onDestroy
* onZoomStart
* onZoom
* onZoomEnd```javascript
...* You can bind a variable to the curr-page-x and curr-page-y attribute. The data binding is bidirectional, so that you can scroll programatically as well as being notified on page change.
```javascript
...* You can watch isMinY, isMinX and isMaxX, isMAxY to find out, if the scrlller reached its final top or bottom, left or right position. These help you to build an infinitescroll or similar. use them as follows:
```javascript
- {{thing}}