Stats

272 Contributors: 3 Tuesday, April 18, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Custom Filters

Syntax

  • Vue.filter(name, function(value){}); //Basic
  • Vue.filter(name, function(value, begin, end){}); //Basic with wrapping values
  • Vue.filter(name, function(value, input){}); //Dynamic
  • Vue.filter(name, { read: function(value){}, write: function(value){} }); //Two-way

Parameters

ParameterDetails
nameString - desired callable name of the filter
value[Callback] Any - value of the data passing into the filter
begin[Callback] Any - value to come before the passed data
end[Callback] Any - value to come after the passed data
input[Callback] Any - user input bound to Vue instance for dynamic results

Related Examples