🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ng-scroll

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-scroll

Angular directive to bind functions on your directive or scope to mouse scroll events

1.0.4
latest
Source
npm
Version published
Weekly downloads
4
-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

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:

<input type="text" 
  data-ng-model="value" 
  data-ng-scroll-up="increment()" 
  data-ng-scroll-down="decrement()" />

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.

Keywords

angular

FAQs

Package last updated on 13 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts