Does ionic has directives for swiping or other events?
I found this service: $ionicGesture
. Should I make my own directives with this?
Or should I use something else like ngTouch?
Does ionic has directives for swiping or other events?
I found this service: $ionicGesture
. Should I make my own directives with this?
Or should I use something else like ngTouch?
There aren't any swipe directives right out of the box, but since the events are exposed, it's pretty simple to throw something together.
Check out this demo
There is a great tutorial explaining how to do that with Ionicframework and AngularJS http://ionicframework.com/blog/ionic-swipeable-cards/
Basically you gonna create a View using the Ionicframework objetcs/functions like the snippet bellow, and create a directive that will call it. See details in the tutorial.
Seems like the swipe directives didn't exist when this question was active, but they are available now: http://ionicframework.com/docs/api/directive/onSwipe/
Also avaiable:
on-swipe-left
,on-swipe-right
,on-swipe-up
andon-swipe-down
.