Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera uno-de-piera/1Filters.js Secret
Last active Jun 20, 2019

Embed
What would you like to do?
Vue.filter('booleanToString', function (boolean, ifTrue, ifFalse) {
return boolean ? ifTrue : ifFalse;
});
this.$options.filters.booleanToString(user.active, 'Sí', 'No')
{{ user.active | booleanToString('', 'No') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.