Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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
  • Socket score

Version published
Maintainers
2
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc