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
- [Vuejs]-Vue.js event emitted by child component does not reach parent
- [Vuejs]-Change Computed Property on Click
Source:stackexchange.com