Conditionals 2 10 / 42
There is another directive called v-show
which you can use to toggle the visibility of the element.
The difference to v-if
is that v-if
will completely remove the element from the DOM, not just toggle the CSS display
property.
If something needs frequent toggling you are better off using v-show
as it is a less expensive operation.