$ionicGesture.off not working

Hi, I used ionic gesture to set hold and doubletap gestures on my element. however, if no data is returned by server, i want to set off the gestures. Here is my code:


.directive(‘rentDetail’, function($ionicGesture, $ionicPopup, $state, BookService, $rootScope) {

var gesture = null;

var removeGesture = function() {
$ionicGesture.off(gesture, ‘hold doubletap’);

var templateText = function() {return ‘’};

var rentDetail = function(scope, elem, attrs) {
gesture = $ionicGesture.on(‘hold doubletap’, function() {
title: “

Rent Detail

template: ‘


okText: ‘Dismiss’
}, angular.element(elem[0].getElementsByClassName(‘rz-pointer’)))

return {
restrict: ‘A’,
link: function(scope, elem, attrs) {
rentDetail(scope, elem, attrs)

  $rootScope.$on('no-markers', function() {


However, after setting the gesture through rentDetail(), I am unable to remove Gestures using removeGesture().

Could you point out why?

I am having the same issue. @shaileshgupta did you find a solution?