Open AntoineAugusti opened 9 years ago
Hey,
I'd like to create a custom filter and also use an already existing filter in the function definition.
For example, I'd like to create a custom filter called pounds that calls the existing filter currency with £.
pounds
currency
£
How can I achieve this?
Vue.filter('currency')(value, '£')
Thanks. My final goal is having an integer instead of a float. £12 instead of £12.00. I was thinking about using a sub string + the currency filter.
£12
£12.00
Hey,
I'd like to create a custom filter and also use an already existing filter in the function definition.
For example, I'd like to create a custom filter called
pounds
that calls the existing filtercurrency
with£
.How can I achieve this?