{{ food.name }}
+ +``` + +Visit the following resources to learn more: + +- [@official@v-for documentation](https://vuejs.org/guide/essentials/list#v-for) diff --git a/src/data/roadmaps/vue/content/v-html@bZxtIBeIfeUcR32LZWrPW.md b/src/data/roadmaps/vue/content/v-html@bZxtIBeIfeUcR32LZWrPW.md index fa347fda9..87a9a351b 100644 --- a/src/data/roadmaps/vue/content/v-html@bZxtIBeIfeUcR32LZWrPW.md +++ b/src/data/roadmaps/vue/content/v-html@bZxtIBeIfeUcR32LZWrPW.md @@ -1 +1,14 @@ -# v-html \ No newline at end of file +# v-html + +The `v-thml` directive is similar to the `v-text` directive, but the difference is that `v-html` renders its content as HTML. This means that if you pass an HTML element it will be rendered as an element and not plain text. Since the content is render as HTMl, it can pose a security risk if the content contains malicius JavaScript code. For this reason you should never use this directive in combination with user input, unless the input is first properly sanitized. + +Example: +```vue + + + +``` + +Visit the following resources to learn more: + +- [@official@v-html documentation](https://vuejs.org/api/built-in-directives.html#v-html) diff --git a/src/data/roadmaps/vue/content/v-once@5k9CrbzhNy9iiS6ez2UE6.md b/src/data/roadmaps/vue/content/v-once@5k9CrbzhNy9iiS6ez2UE6.md index 32cf19dd5..03706cd40 100644 --- a/src/data/roadmaps/vue/content/v-once@5k9CrbzhNy9iiS6ez2UE6.md +++ b/src/data/roadmaps/vue/content/v-once@5k9CrbzhNy9iiS6ez2UE6.md @@ -1 +1,21 @@ -# v-once \ No newline at end of file +# v-once + +The `v-once` directive makes an HTML element render only once, skipping every future update. + +Example: +```vue + + + + +{{ input }}
+ +``` +In this example the **p** element will not change its text even if the input variable is changed through the **input** element. + +Visit the following resources to learn more: + +- [@official@v-once documentation](https://vuejs.org/api/built-in-directives.html#v-once) diff --git a/src/data/roadmaps/vue/content/v-pre@mlsrhioiEkqnRIL6O3hNa.md b/src/data/roadmaps/vue/content/v-pre@mlsrhioiEkqnRIL6O3hNa.md index 6c58998f0..aa157f58a 100644 --- a/src/data/roadmaps/vue/content/v-pre@mlsrhioiEkqnRIL6O3hNa.md +++ b/src/data/roadmaps/vue/content/v-pre@mlsrhioiEkqnRIL6O3hNa.md @@ -1 +1,20 @@ -# v-pre \ No newline at end of file +# v-pre + +The `v-pre` directive makes an element render its content as-is, skipping its compilation. The most common use case is when displaying raw mustache syntax. + +Example: +```vue + + + +{{ text }}
+ +``` +The **p** element will display: `{{ text }}` and not `Some Text` because the compilation is skipped. + +Visit the following resources to learn more: + +- [@official@v-pre Documentation](https://vuejs.org/api/built-in-directives.html#v-pre) diff --git a/src/data/roadmaps/vue/content/v-text@NCIzs3jbQTv1xXhAaGfZN.md b/src/data/roadmaps/vue/content/v-text@NCIzs3jbQTv1xXhAaGfZN.md index 2665e99c3..0533bc86c 100644 --- a/src/data/roadmaps/vue/content/v-text@NCIzs3jbQTv1xXhAaGfZN.md +++ b/src/data/roadmaps/vue/content/v-text@NCIzs3jbQTv1xXhAaGfZN.md @@ -1 +1,15 @@ -# v-text \ No newline at end of file +# 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: +```vue + + + +``` + +Visit the following resources to learn more: + +- [@official@v-text documentation](https://vuejs.org/api/built-in-directives.html#v-text)