in Vue.JS by
Q:
How to pass an argument to Vue.js filters?

1 Answer

0 votes
by

Consider:

filters:{
   currency: function(value, arg1){
     return arg1+value;
}

And usage:

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.1/vue.js"></script>
<div id="vue-instance">
  {{123 | currency('$') }}
</div>
Click here to read more about Vue JS
Click here to read more about Insurance

Related questions

0 votes
asked Oct 9, 2019 in Vue.JS by Indian
0 votes
asked Oct 7, 2019 in Vue.JS by Tate
0 votes
asked Oct 9, 2019 in Vue.JS by Indian
0 votes
asked Oct 9, 2019 in Vue.JS by Indian
0 votes
asked Jan 9, 2020 in Vue.JS by GeorgeBell
...