• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What are the supported modifiers on the v-model directive in Vue.js?

Answer -

Following are the three modifiers supported for the v-model directive in Vue.js:

lazy: By default, the v-model directive syncs the input with the data after each input event. We can add the lazy modifier to instead sync after change events.
  
   
number: The number modifier is used to our v-model when we want user input to be automatically typecast as a number. With the type="number", the value of HTML input elements always returns a string. That's why this typecast modifier is required.
  
trim: We should add the trim modifier to our v-model when we want whitespace from user input to be trimmed automatically.
  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners