Tutorial by Examples

With a two-way filter, we are able to assign a read and write operation for a single filter that changes the value of the same data between the view and model. //JS Vue.filter('uppercase', { //read : model -> view read: function(value) { return value.toUpperCase(); }, ...
Custom filters in Vue.js can be created easily in a single function call to Vue.filter. //JS Vue.filter('reverse', function(value) { return value.split('').reverse().join(''); }); //HTML <span>{{ msg | reverse }}</span> //'This is fun!' => '!nuf si sihT' It is good prac...

Page 1 of 1