$ionicGesture
An angular service exposing ionic
ionic.EventController
’s gestures.
Methods
on(eventType, callback, $element, options)
Add an event listener for a gesture on an element. See ionic.EventController
.
Param | Type | Details |
---|---|---|
eventType |
string
|
The gesture event to listen for. |
callback |
function(e)
|
The function to call when the gesture happens. |
$element |
element
|
The angular element to listen for the event on. |
options |
object
|
object. |
- Returns:
ionic.Gesture
The gesture object (use this to remove the gesture later on).
off(gesture, eventType, callback)
Remove an event listener for a gesture on an element. See ionic.EventController
.
Param | Type | Details |
---|---|---|
gesture |
ionic.Gesture
|
The gesture that should be removed. |
eventType |
string
|
The gesture event to remove the listener for. |
callback |
function(e)
|
The listener to remove. |