[Vuejs]-Not binding the IF to any element in Vue

5👍

You can use a template for that.

we can use v-if on a <template> element, which serves as an invisible
wrapper. The final rendered result will not include the <template>
element.

For example:

<template v-if="name">
  Hi there, <span>{{ name }}</span>
</template>
👤Roy J

Leave a comment