Question - How can you handle Events in Vue.js?
Answer -
See the following example which demonstrates how to handle Events in Vue.js:
HTML Code:
Name:
div>
JS Code:
var myViewModel = new Vue({
el: '#app',
data: my Model,
// A click handler inside methods
methods: {
ClickHandler: function(e) {
alert("Hello " + this.name);
}
}
});
Comment(S)
Show all Coment
Leave a Comment