Im following Jeffery's vue-series to learn how to impelement vue.js into my projects. Im understanding the basics however Im having a problem with the v-on attribute. For some reason I can't get any of my methods to run on blur click or whatever. Jeffery is using the "" brackets in the video yet in the documentation they use it without. I've tried both and couldn't even get it to log on the console. Here is my setup.
HTML:
<div id = "demo" class = "container">
<ul>
<li v-for = "name in names">@{{ name }}</li>
</ul>
<input type="text" placeholder="Add new name" v-model = "newName" v-on="blur:addName">
</div>
vue.js
new Vue({
el: '#demo',
data: {
names: ['Ricki', 'Kevin', "James"]
},
methods: {
addName: function() {
console.log('working');
}
}
});