⊗jsvuPmCdInv 18 of 72 menu

Inverting a condition in Vue

You can invert a condition using an exclamation mark:

<template> <p v-if="!visible">text</p> </template>

In this case, the paragraph will be shown if visible is false and hidden if true.

Invert the condition:

<template> <p v-if="hidden">text</p> </template>
enru