What are filters in Vue.js?

Technology CommunityCategory: Vue.jsWhat are filters in Vue.js?
VietMX Staff asked 3 years ago

In Vue js filters are used to transform the output that are going to rendered on browser.

A Vue.js filter is essentially a function that takes a value, processes it, and then returns the processed value. In the markup it is denoted by a single pipe (|) and can be followed by one or more arguments:

<element directive="expression | filterId \[args...\]"></element>