Git Product home page Git Product logo

ngtouch's Introduction

No longer maintained, would you be our new maintainer? Let us know at [email protected].

nglar - ngTouch

A angular module to add directives for touch devices.

Build Status StyleCI Status Dependencies Dev Dependencies License

Info

Version: 1.0.2
Author: Mark Topper [Facebook] [Github] [Twitter]
Website: ulties.com
Email: [email protected]

Installing/Loading

Install using Bower

Install using bower:

bower install ngtouch --save

Install using NPM

Install using npm:

npm install ngtouch --save

Go to NPM page for this package.

Loading

Load the file to you HTML header:

<script type="text/javascript" src="path/to/components/ngtouch/build/ngTouch.min.js"></script>

Usage

You must include the ngTouch dependency on your angular module:

var app = angular.module("demoapp", ["ngTouch"]);

Then in your HTML you can use:

<div ng-touchmove="someFunction()" ng-touchstart="someFunction()" ng-touchend="someFunction()"></div>

ng-touchstart

Once a touch device start touching, this event will be called.

Here is a usage example:

yourController.js

$scope.onTouchstart = function() {
   console.log($scope.event); // the event object
   console.log('touchstart event called');
}

yourView.html

<div ng-touchstart="onTouchstart()"></div>

Get ngTouchstart standalone.

ng-touchend

Once a touch device end touching, this event will be called.

Here is a usage example:

yourController.js

$scope.onTouchend = function() {
   console.log($scope.event); // the event object
   console.log('touchend event called');
}

yourView.html

<div ng-touchend="onTouchend()"></div>

Get ngTouchend standalone.

ng-touchmove

Whenever a touch device is touched and moving.

Here is a usage example:

yourController.js

$scope.onTouchmove = function() {
   console.log($scope.event); // the event object
   console.log('touchmove event called');
}

yourView.html

<div ng-touchmove="onTouchmove()"></div>

Get ngTouchmove standalone.

ng-tap

Whenever a touch device is tapped without moved around.

Here is a usage example:

yourController.js

$scope.onTap = function() {
   console.log($scope.event); // the event object
   console.log('tap event called');
}

yourView.html

<div ng-tap="onTap()"></div>

Get ngTap standalone.

Links

The following is a list of libraries that extend ngTouch:

  • None yet

Contact me at [email protected] to get yours added.

The following is a list of libraries that requires by ngTouch:

  • Angular: HTML enhanced for web apps

The following is a list of alternatives for ngTouch:

  • ngTouchmove: A angular module to add directive ng-touchmove.

  • ngTouchstart: A angular module to add directive ng-touchstart.

  • ngTouchend: A angular module to add directive ng-touchend.

  • ngTap: A angular module to add directive ng-tap.

Tests

From the project directory, tests can be ran using gulp test

Contributing

Thank you for considering contributing! The contribution guide can be found in the contributions.md.

Security Vulnerabilities

If you discover a security vulnerability within ngTouch, please send an e-mail to Mark Topper at [email protected]. All security vulnerabilities will be promptly addressed.

License

Released under the MIT License - see license.txt for details.

ngtouch's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.