Directives are like mini functions that you can use to quickly drop in to your code, mainly to improve the user experience, and to add new low-level features to your graphic interface.
Creating a new directive
Getting ready
This recipe, although found in the advanced chapter, is really easy to complete. The main reason directives are advanced is because you should usually prefer composition to add functionality and style to your apps. When components won't cut it, use directives.
How to do it...
We will build a v-pony directive that will turn any element into a pony element. A pony element is created...