how to use if from method in vue code example
Example 1: vue v-if
<div v-if="Math.random() > 0.5">
Now you see me
</div>
<div v-else>
Now you don't
</div>
Example 2: vue if
<h1 v-if="variable">Vue is awesome!</h1>
<div v-if="Math.random() > 0.5">
Now you see me
</div>
<div v-else>
Now you don't
</div>
<h1 v-if="variable">Vue is awesome!</h1>