How to disable Right Click, using Angular JS?

Requirement:- We need to disable Right Click on links in our Angular JS Application?

Context Menu
Context-Menu default behaviour


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 .

Context Menu Disabled



HTML code


Directive Context Menu
Directive for disabling Context-Menu

Working Demo

Hope it helps our readers, please feel free to share your comments .

2 thoughts on “How to disable Right Click, using Angular JS?

Leave a Reply

Your email address will not be published. Required fields are marked *