lc-touch

0.6.11 • Public • Published

lcTouch

An Angular.js touch library

Build Instructions

grunt build

This will build a normal version and a minified version of the module and place it in the dist folder.


Directives List

ngTap - Adds tap support with a fallback to clicks for desktop browsers

ngTapOutside - Adds tap support for when a user taps or clicks outside a designated area

ngSwipeDown - Adds Swipe Down support to an element

ngSwipeUp - Adds Swipe Up support to an element

ngSwipeLeft - Adds Swipe Left support to an element

ngSwipeRight - Adds Swipe Right support to an element


ngTap

Adds tap support with a fallback to clicks for desktop browsers

Restricted to: Attribute

Usage:

<button type="button" ng-tap="doSomething()">Click Me</button>

Parameters:

  • ngTap - {string} - An expression representing what you would like to do when the element is tapped or clicked

===============

ngTapOutside

Adds tap support for when a user taps or clicks outside a designated area

Restricted to: Attribute

Usage:

<button type="button" ng-tap-outside="closeDropdown()" when="dropdownOpen == true">Show Dropdown</button>

Parameters:

  • ngTapOutside - {string} - An expression representing what you would like to do when the element is tapped or clicked
  • when - optional - {string} - An expression that will return a boolean which represents when it should listen for tap outside events

===

ngSwipeDown

Adds Swipe Down support to an element

Restricted to: Attribute

Usage:

<div ng-swipe-down="function()" ng-swipe-down-threshold="300">
	...
</div>

Parameters:

  • ngSwipeDown - {string} - An expression representing what you would like to do when the element is swiped
  • ngSwipeDownThreshold - optional - {integer} - The minimum amount in pixels you must swipe. Defaults to 70

===

ngSwipeUp

Adds Swipe Up support to an element

Restricted to: Attribute

Usage:

<div ng-swipe-up="function()" ng-swipe-up-threshold="300">
	...
</div>

Parameters:

  • ngSwipeUp - {string} - An expression representing what you would like to do when the element is swiped
  • ngSwipeUpThreshold - optional - {integer} - The minimum amount in pixels you must swipe. Defaults to 70

===

ngSwipeLeft

Adds Swipe Left support to an element

Restricted to: Attribute

Usage:

<div ng-swipe-left="function()" ng-swipe-left-threshold="300">
	...
</div>

Parameters:

  • ngSwipeLeft - {string} - An expression representing what you would like to do when the element is swiped
  • ngSwipeLeftThreshold - optional - {integer} - The minimum amount in pixels you must swipe. Defaults to 70

===

ngSwipeRight

Adds Swipe Right support to an element

Restricted to: Attribute

Usage:

<div ng-swipe-right="function()" ng-swipe-right-threshold="300">
	...
</div>

Parameters:

  • ngSwipeRight - {string} - An expression representing what you would like to do when the element is swiped
  • ngSwipeRightThreshold - optional - {integer} - The minimum amount in pixels you must swipe. Defaults to 70

Package Sidebar

Install

npm i lc-touch

Weekly Downloads

2

Version

0.6.11

License

MIT

Last publish

Collaborators

  • lelandcope