angular-wheelie
angular-wheelie exposes a service that allows you to bind mousewheel events to an angular element.
Installation
Install with bower:
bower install angular-wheelie
Or with npm:
npm install angular-wheelie
Or simply download the latest release.
Usage
The pre-built files can be found in the dist/
directory.
dist/angular-wheelie.min.js
is minified and production-ready. Example usage:
<script src="dist/angular-wheelie.min.js"></script>
Add wheelie
to your app's module dependencies:
angular.module('myapp', ['wheelie']);
And now you can use the wheelie
service in your controllers, directives,
services etc. Example usage in a controller:
app.controller('MyController', ['wheelie', function (wheelie) {
var target = angular.element('#someElement');
wheelie.bind(target, {
up: function (event) {
console.log('mousewheel up on element #someElement!');
},
down: function (event) {
console.log('mousewheel down on element #someElement!');
}
});
wheelie.unbind(target);
}]);
Contributing
Contributions are welcomed! Here are the contribution guidelines.
First clone the repository and install dependencies:
npm install
To run tests:
npm test
To lint the code:
npm run lint
To make a production build:
npm run build
License
The MIT License