Vue Concatenate variable and text

Last Updated: November 18, 2020

You can see the following example for cocatenating

<div class="wrapper"  v-bind:key="index" v-for="(obj, index) in phones">
    <input :id="'id_'+index" name="a11y-issues" v-model="seleted_phone" type="radio" :value="" />

This is how you do it


You can’t use curly bracket (moustache tags) in attributes.

See how src of the image has been concatenated with variable and text

<img v-bind:src="imgPath + 'img/logo.png'">