©
Dokumen ini menggunakan Manual laman web PHP Cina Lepaskan
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.
<ANY
ng-swipe-right="">
...
</ANY>
参数 | 类型 | 详述 |
---|---|---|
ngSwipeRight | expression | 在xx触发时执行的表达式 right swipe. (事件对象存于 |
<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']);