Vue Directives


Vue has a set of directives.

Directive Description
v-bind Binds an attribute to a data property
v-cloak Hides an un-compiled template until it is ready
v-for Renders a list of elements
v-html Outputs HTML code in the template
v-if Renders an element conditionally
v-else-if Renders an element conditionally when the first part of the if-statement is false
v-else Renders an element when the first part of the if-statement is false
v-memo Holds back rendering of an element until a change is detected in one or more specified properties
v-model Creates a two-way binding between an input element and the corresponding data property
v-on Connects an event to an action
v-once Renders an element only once
v-pre Skips compilation of an element and its content
v-show Toggles an element's visibility conditionally
v-slot Directs content to a named slot
v-text Updates an element's text content

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.