I want to generate radio buttons in vue.js by v-for, but when they are generated if i selected one radio the rest radios is selected too, so i want user to be able to choose only one radio.'
<template>
<div>
<div v-for="item in items">
<input type="radio" id="l1" value="item.text" v-model="checked">
<label id="l1" for="item.text">{{item.text}}</label>
</div>
</div>
</template>
:beforeforto tell Vue to interpret its contents as a js expression instead of as a string:<input type="radio" :for="item.text">. Do the same for:value="item.text". It's a shorthand forv-bind:forandv-bind:value.