Improve this Doc View Source ngSwipeLeft

From Get docs
< Improve this Doc ngTouch‎ | directiveAngularjs/docs/1.8/api/ngtouch/directive/ngswipeleft


Improve this Doc View Source ngSwipeLeft

  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 left on a touchscreen device. A leftward swipe is a quick, right-to-left slide of the finger. Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag too.

To disable the mouse click and drag functionality, add ng-swipe-disable-mouse to the ng-swipe-left or ng-swipe-right DOM Element.

Requires the ngTouch module to be installed.


Directive Info

  • This directive executes at priority level 0.

Usage

  • as element:

    <ng-swipe-left
      ng-swipe-left="expression">
    ...
    </ng-swipe-left>
  • as attribute:

    <ANY
      ng-swipe-left="expression">
    ...
    </ANY>


Arguments

Param Type Details
ngSwipeLeft expression Expression to evaluate upon left swipe. (Event object is available as $event)


Example

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
https://code.angularjs.org/1.8.2/docs/api/ngTouch/directive/ngSwipeLeft