Dobry den, everybody!
I have a daynamic table, created with vue.js
<tbody>
<tr v-for="(row, index) in tableData">
<td>{{ (index + 1) }}</td>
<td>{{ row.link }}</td>
<td>{{ row.location}}</td>
<td class="small center">{{ row.useful }}</td>
<td class="small center">{{ row.useless }}</td>
<td class="small center">{{ row.neverResponded }}</td>
</tr>
</tbody>
Now I want to make a link clickable but don`t know how to do it. Here is what I tried:
<tbody>
<tr v-for="(row, index) in tableData">
<td>{{ (index + 1) }}</td>
<td><a href="{{ row.link }}">{{ row.link }}</a></td>
<td>{{ row.location}}</td>
<td class="small center">{{ row.useful }}</td>
<td class="small center">{{ row.useless }}</td>
<td class="small center">{{ row.neverResponded }}</td>
</tr>
</tbody>
But value is not passed because of quotes (obviously). Is there any way to pass this variable to href? Thank you!
>Solution :
You can bind your link:
<td><a :href="row.link">{{ row.link }}</a></td>