[Vuejs]-Using curly braces in v-text field vuetify?

1👍

You’re missing the backticks

v-text="`${item.name} ${item.surname} ${(item.place_name ? ' (' + item.place_name + ')' : '')`}"

That above should work just fine, remember you can also use interpolation with double curly braces like:

{{ `${item.name} ${item.surname} ${(item.place_name ? ' (' + item.place_name + ')' : '')` }}

within the tags you created instead of the v-text directive

and you could also save that value in a properly named computed property and reference it like

v-text="myComputedProperty"

so you remove that logic from your template

Leave a comment