Khandaker Toihidul Islam
Front-end Developer
React Js | Javascript | HTML | CSS | Bootstrap | Wordpress | PHP | Mysql

Vue conditional rendering

<div id="app">
    <p v-if="show"> You cane see me </p>
    <p v-else> I am from else  </p>
    <button @click="show =! show"> Switch  </button>
</div>
<script type="text/javascript">
	new Vue({
		el: "#app",
		data: {
			show : true,
		}
	});
</script>

Demo http://vue.toihid.com/section-3/vue-conditional-rendering.php

You may also like...

Leave a Reply