ionic gesture event



##on-holdThe long press time is 500 milliseconds.
<button 
	on-hold="onHold()" 
	class="button">
	Test
	</button>
on-tapThis is a gesture tap event, If the long press lasts longer than 250 milliseconds, it's not a tap. .
<button 
	on-tap="onTap()" 
	class="button">
	Test
	</button>
on-double-tapHand double-tap screen event
<button 
	on-double-tap="onDoubleTap()" 
	class="button">
	Test
	</button>
on-touchThere is still a difference between this and on-tap Yes, this is executed immediately, and it is executed immediately when the user clicks. No need to wait for touchend/mouseup.
	<button on-touch="onTouch()" 
	class="button">
	Test
	</button>
on-releaseFires when the user ends the touch event .
<button 
	on-release="onRelease()" 
	class="button">
	Test
</button>
on-dragThis is somewhat similar to drag on the PC Pull. When you keep clicking on an object and your hand starts to move, on-drag will be triggered.
<button 
	on-drag="onDrag()" 
	class="button">
	Test
</button>
on-drag-upDrag up.
<button 
	on-drag-up="onDragUp()" 
	class="button">
	Test
</button>
on-drag-rightDrag right.
<button 
	on-drag-right="onDragRight()" 
	class="button">
	Test
</button>
on-drag-downDrag down.
<button 
	on-drag-down="onDragDown()" 
	class="button">
	Test
</button>
##on-drag-leftTry it»on-swipeTry it»on-swipe-upTry it »on-swipe-right
EventDescriptionUsageExample
Try it»
Try it»
Try it»
Try it »
Try it»
Try it »
Try it »
Try it »
Try it »
Drag to the left.
<button 
	on-drag-left="onDragLeft()" 
	class="button">
	Test
</button>
refers to the finger sliding effect, which can be in any direction. And similar to on-drag, there are separate events in four directions.
<button 
	on-swipe="onSwipe()" 
	class="button">
	Test
</button>
Up finger swipe effect .
<button 
	on-swipe-up="onSwipeUp()" 
	class="button">
	Test
</button>
Swipe your finger to the right Effect.
<button 
	on-swipe-right="onSwipeRight()" 
	class="button">
	Test
</button>
Try it »
on-swipe-downDown finger swipe Effect.
<button
	on-swipe-down="onSwipeDown()"
	class="button">
	Test
</button>
Try it»
on-swipe-leftSwipe your finger to the left Effect.
<button 
	on-swipe-left="onSwipeLeft()"
	class="button">
	Test
</button>
Try it»

##$ionicGesture

an angular The service displays the ionicionic.EventController gesture.

Method

on(eventType, callback, $element)

Add an event listener on an element.

ParametersTypeDetailseventTypecallback$elementoptions
off(eventType, callback, $element)
stringGesture events to listen for.

function(e)Event triggered when a gesture event occurs.

elementEvents listened by angular elements.

objectObject.

Remove a gesture event listener on an element.

ParametersTypeDetailseventTypecallback$element
stringRemove the monitored gesture event.

function(e)Remove the listener.

elementThe angular element that is listening for the event.