Reputation: 1412
<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.
Upvotes: 78
Views: 30990
Reputation: 1106
you can sometimes use the <slot>
element to make what you want. Have a look at the slot documentation here
Upvotes: -8
Reputation: 85653
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.
Upvotes: 190