How to detect right-click in Angular
To detect a right-click, use (contextmenu).
<div contextmenu='onContext()'></div>
The onContext handler is executed when you right-click inside the div tag.
Since the context menu is displayed at the end of the right-click, return false; should be written at the end.
onContext() {
// some kind of code
return false; // I'll write this down.
}



コメント