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. }
![株式会社CONFRAGE](https://i0.wp.com/confrage.jp/wp-content/uploads/2018/08/aaaaaaaaa-1.jpg?resize=100%2C100&ssl=1)
コメント