Khandaker Toihidul Islam
Software Engineer
Backend : PHP | Mysql | Symfony | CakePhp | Wordpress | Drupal
Frontend : Node js | Vue js | React Js | Javascript | HTML | CSS | Bootstrap
Tools , Server : Nginx | Apache | Git | Jenkins | Jira | Asana | Silenium | Spira

Vue conditional rendering in the template

	<div id="app">
		<p v-if="show"> You cane see me </p>
		<p v-else> I am from else  </p>
		<template v-if="show">	
				<h2> Hi Template</h2>
				<p>	I am from template</p>

		</template>
		<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-group.php

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *