Using this I am checking for a right click on my button. How can I check for a double click on my button?
app.directive('rightClick', function ($parse, $mdMenu) {
return function (scope, element, attrs) {
var fn = $parse(attrs.rightClick);
element.on('contextmenu', function (event) {
event.preventDefault();
scope.$apply(function () {
fn(scope, { $event: event });
});
event.stopPropagation();
});
};
});
<button right-click="$mdMenu.open($event)" id="{{element.id}}">
Could you try listening for the
dblclickevent!html
js
stackblitz