Event Handling in VueJs

A simple event handling demo in VueJs using the v-on:* directive - http://coligo.io

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js"></script>
<div id="vue-instance">
  Enter your name: <input type="text" v-model="name">
  <button v-on:click="sayHello">Hey there!</button>
</div>

JavaScript

var vm = new Vue({
  el: '#vue-instance',
  data: {
    name: ''
  },
  methods: {
    sayHello: function(){
      alert('Hey there, ' + this.name);
    }
  }
});