Directives are used with a markup language to perform some functions on the DOM elements. For example, in HTML markup language, when we write:
<div class='app'></div>
The class used here is a directive for HTML language. Similarly, Vue.js also provides a lot of such directives to make application development easier, such as:
- v-text
- v-on
- v-ref
- v-show
- v-pre
- v-transition
- v-for