According to VueJS documentation, v-cloak
"directive can be used to hide un-compiled mustache bindings until the Vue instance is ready.". In other word, I can hide a div
or something like that, and it will be displayed when vue is ready.
Does VueJS provides its inverse? Something that hides until VueJS is ready?
As simple as:
<div v-if="false">Will be visible until vue is mounted/ready...</div>
Work for all versions.
The element has to be inside your container... if you use to hide your master container, change it that way:
<div id="app">
<div v-if="false">Visible while loading...</div>
<div v-cloak>Visible when ready...</div>
</div>
There plenty of solutions, I think another one will be to use v-if
with a false property in data
like:
<div v-if="false">Loading Vue....</div>
<div v-cloak>vue loaded</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With