ng-click and ng-dblclick in the same element

Asked

Viewed 26 times

1

<div ng-click = "clickOne()" ng-dblclick = "clickTwo()">Enter</div>

Javascript>

$scope.clickOnce = function () {    
  alert("CLick One");    
}

$scope.clicktwice= function () {    
 alert("CLick two");    
}

There would be some way for my ng-click not to interfere with my ng-dblclick. by once clicking wait a while before performing the function, to differentiate ng-dblclick from ng-click, as right now I double-clicking it triggers my one-click function.

  • 1

    Following an example solving this problem, the user created a kind of click counter. [https://stackoverflow.com/questions/20444409/handling-ng-click-and-ng-dblclick-on-the-same-element-with-angularjs][1]

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.