Requirement:- We need to disable Right Click on links in our Angular JS Application?
![]() |
Context-Menu default behaviour |
Solution:-
We wrote a directive to override the default behaviour of “Context Menu”
Further we can use this directive to bind specific action on right click, using the contextmenu event.The contextmenu event fires when the user calls the context menu by right-clicking it .
![]() |
Code:-
HTML:-
![]() |
HTML code |
Directive:-
![]() |
Directive for disabling Context-Menu |
Working Demo
Hope it helps our readers, please feel free to share your comments .
2 replies on “How to disable Right Click, using Angular JS?”
nice one
Shift + F10 still works here.. Any way to disable that also?