W3cubDocs

/Angular.js 1.5

Improve this Doc View Source ngSwipeRight

  1. directive in module ngTouch

Specify custom behavior when an element is swiped to the right on a touchscreen device. A rightward swipe is a quick, left-to-right slide of the finger. Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag too.

Requires the ngTouch module to be installed.

Directive Info

  • This directive executes at priority level 0.

Usage

  • as element: (This directive can be used as custom element, but be aware of IE restrictions).
    <ng-swipe-right
      ng-swipe-right="expression">
    ...
    </ng-swipe-right>
  • as attribute:
    <ANY
      ng-swipe-right="expression">
    ...
    </ANY>

Arguments

Param Type Details
ngSwipeRight expression

Expression to evaluate upon right swipe. (Event object is available as $event)

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ngTouch/directive/ngSwipeRight