?
本文檔使用 PHP中文網(wǎng)手冊(cè) 發(fā)布
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.
<ANY
ng-swipe-left="">
...
</ANY>
參數(shù) | 類(lèi)型 | 詳述 |
---|---|---|
ngSwipeLeft | expression | 在xx觸發(fā)時(shí)執(zhí)行的表達(dá)式 left swipe. (事件對(duì)象存于 |
<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('ngSwipeLeftExample', ['ngTouch']);