Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fluffynuts/ng-scroll

A simple angular directive to assist with handling mouse scroll events
https://github.com/fluffynuts/ng-scroll

Last synced: 19 days ago
JSON representation

A simple angular directive to assist with handling mouse scroll events

Awesome Lists containing this project

README

        

# ng-scroll
A simple angular directive to assist with handling mouse scroll events

### Usage
Make use of the (data)-ng-scroll-up and (data)-ng-scroll-down attributes on your
elements. The value placed inside these attributes is a function to evaluate in the
local scope.

For example:
```

```
When used with a controller or directive with logic like so:
```
function linkOrController($scope) {
$scope.value = 0;
$scope.increment = function() {
$scope.value++;
};
$scope.decrement = function() {
$scope.value--;
}
}
```
basically implements a numeric spinner which responds to scroll events -- a more fleshed
out example can be found in the test/demo.html file.