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

Vue component

<script src="https://unpkg.com/vue@2.6.11/dist/vue.js"></script>
<div id="example" class="text-center">
  <my-component></my-component>
  <my-component></my-component>
</div>
<script type="text/javascript">
	// register
	Vue.component('my-component', {
	  template: '<div>A custom component!</div>'
	});

	// create a root instance
	new Vue({
	  el: '#example'
	})

</script>

Demo http://vue.toihid.com/section-5/vue-components.php

You may also like...

Leave a Reply