1.0.28
https://jsfiddle.net/8L7f9u53/2/
Pipelining (chaining) filters
Only first filter executes
<div id="mount-point">
<p v-text="test|foo"></p> <!-- string.foo -->
<p v-text="test|bar"></p> <!-- string.bar -->
<p v-text="test|foo|bar"></p> <!-- string.foo but expected string.foo.bar -->
</div>
Vue.filter('foo', function(s) {
return s + '.foo';
})
Vue.filter('bar', function(s) {
return s + '.bar';
})
new Vue({
el: '#mount-point',
data: {
test: 'string'
}
})
https://jsfiddle.net/8L7f9u53/3/
please pipelining filters with space
Hmm, there are not strictlify filter grammer spec in docs, but I think pipelining filters with space is good human readable coding design.
http://v1.vuejs.org/guide/custom-filter.html
Most helpful comment
Hmm, there are not strictlify filter grammer spec in docs, but I think pipelining filters with space is good human readable coding design.
http://v1.vuejs.org/guide/custom-filter.html