December 2014
Intermediate to advanced
272 pages
8h 17m
English
Another very common use of custom directives is to implement event handlers to interact with mouse and keyboard events that are occurring in the custom elements. This enables you to provide enhanced user interactions to the custom elements.
In this example we will add mouse event handlers that enable you to use drag operations on images to resize and adjust the opacity. When the mouse is dragged left the image shrinks; right, the image enlarges; up, the image fades; and down, the opacity increases. For this example, I have included the full version of jQuery by loading it in the AngularJS template. I chose to do so to use some capabilities like getting the image width() that is not available in ...
Read now
Unlock full access