Improve this Doc  View Source

ngSwipeRight

  1. - directive in module ngTouch
Deprecated: (since 1.7.0)

See the module documentation for more information.

Overview

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

Usage

Arguments

Param Type Details
ngSwipeRight expression

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

Example

<div ng-show="!showActions" ng-swipe-left="showActions = true">
  Some list content, like an email in the inbox
</div>
<div ng-show="showActions" ng-swipe-right="showActions = false">
  <button ng-click="reply()">Reply</button>
  <button ng-click="delete()">Delete</button>
</div>
angular.module('ngSwipeRightExample', ['ngTouch']);