This creates a simple directive in angular js that binds the execution of a function to the context menu event (i.e Right Click) on an element.