Vue on directive
The vue on directive is what can be used in vue templates to preform event attachment for elements in the template. In line JavaScript can be given, however the typical use of the vue on directive is to call a method in the methods object.
There are a number of event and key modifiers that can be used to help make it so the methods that I write are more about the actual logic of what the method does rather than having additional code that helps with DOM element related quirks. For example I can use a prevent event modifier so that I do not have to call the e.preventDefault method in the body of the event handler that I am calling.
There are a few things to cover when it comes to just using the v-on directive, so I thought I would take a deeper look at a few quick examples of v-on directive in action. In the process of doing so I might also touch base on a whole bunch of other vuejs features in the process of doing so while I am at it.