T
T
Troodi Larson2019-02-23 14:25:15
Vue.js
Troodi Larson, 2019-02-23 14:25:15

How to hide {{ }} until value appears?

Good afternoon. I'm new to this framework, and I'm wondering: how can I remove {{ message }} from displaying on the site before it is processed by the script? That is, while Vue is being created, the user sees these curly braces (not for long, but still). I don't see it on these sites. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2019-02-23
@troodi

vue has the v-cloak attribute , add it to the application block

<div v-cloak>
  {{ message }}
</div>

and write in styles
[v-cloak] {
  display: none;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question