• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

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




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners