VueJs Component with <template> Tag

VueJs Component with <template> tag to specify the component's template - http://coligo.io

by Saurabh Mimani

HTML

<script src="https://cdn.jsdelivr.net/vue/1.0.16/vue.js"></script>
<div id="app">
  <greeting></greeting>
</div>

<template id="greeting-template">
  <h1>Welcome to coligo!</h1>
  <button>login</button>
  <button>signup</button>
  <a href="http://coligo.io">Check out the other tutorials!</a>
</template>

JavaScript

Vue.component('greeting', {
  template: '#greeting-template'
});

// create a new Vue instance and mount it to our div element above with the id of app
var vm = new Vue({
  el: '#app'
});