Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/fluffynuts/ng-scroll
- Owner: fluffynuts
- License: bsd-2-clause
- Created: 2016-06-11T19:21:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-13T14:12:43.000Z (over 8 years ago)
- Last Synced: 2025-01-02T14:04:45.860Z (24 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.