Long tap event


#1

i have ion-list with Swiping left options.
i trying to get long tap on item to open modal.
the problem is that swiping left and long tap conflict.

any idea how to solve this?


#2

the way I do is making a directive,

directive("hold", function($ionicGesture){
return {
	restrict: 'A',
	link: function ($scope, $element, $attr){
		var handleHold = function(e){
			$scope.$apply($attr.hold);
		}
		
		$ionicGesture.on('hold', handleHold, $element);
	}
}
});

then use the attr on ion-list
hold=“yourFunction”


#3

why declaring a new directive and not simply use the ionic build in gesture directive like:

on-hold=“yourFunction”

//

pelle