Categories

Jan 9 in Vue.JS
Q:

How to create a custom filter in Vue.js?

1 Answer

Jan 9

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('')

})

Click here to read more about Vue JS
Click here to read more about Insurance

Related questions

Madanswer
Jan 9 in Vue.JS
Oct 7, 2019 in Vue.JS
Oct 9, 2019 in Vue.JS
...