TypeError: Cannot read property 'addEventListener' of undefined


#1

Hello,
I used this code :

var element = angular.element(document.querySelector(’#content’));

    $ionicGesture.on('tap', function(e){
        $scope.$apply(function() {
            $scope.$broadcast('scroll.refreshComplete');
        })    
    }, element);

and got this error :
TypeError: Cannot read property ‘addEventListener’ of undefined

Any Help please !


#2

+1.
Can anyone explain what the cause of this is? I have added $ionicGesture to my controller too