• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - How to create a custom filter in Vue.js?

Answer -

Vue.filter() method is used to create and register a custom filter in Vue js. Vue.filter() method takes two parameters a filterId that is usnique name to filter that you going to create and a filter function that takes a value as the argument and returns the transformed value.
Vue.filter('reverse', function (value) {
  return value.split('').reverse().join('')
})

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners