Vuejs 2 : How to make data lowercase
You could even do this
{{tag.title.toLowerCase().trim()}}
In Vue.js 2.0, computed properties can be used to replace filters:
computed: {
searchInLowerCase() {
return this.search.toLowerCase().trim();
}
}
And now you can simply use searchInLowerCase
in your template:
<li v-show="'hello'.includes(searchInLowerCase) && search !== ''">Hello</li>