Back to Developer Roadmap

v-text

src/data/roadmaps/vue/content/[email protected]

4.0502 B
Original Source

v-text

The v-text directive is used to set the textContent property of an element. It's important to note that when using this directive it will overwrite the HTML content inside the element. The expected input is a string, so it's important to wrap any text in single quotes.

Example

html
<template>
  <p v-text="'I am some text'"></p>
</template>

Visit the following resources to learn more: