How to use v-if and v-else without any html tag or else

List item

<ul>
 <li>language</li>

   < v-if= "tree()"> //which tag I may use or any other process
    <li>home</li>
    <li>about</li>
   <>
   < v-else> //which tag I may use or any other process
    <li>accounts</li>
    <li>listing</li>
   <>
</ul>'

In the V-if which html tag i may use or any other vue.js process to work with this.


You can use template:

<template v-if="condition">
</template>
<template v-else>
</template>

Template will not be rendered in the browser. But it will parse the contents inside of this to the html.