<tr v-for="(i, index) in streams">
<td class="text-center">{{index + 1}}</td>
<td class="text-center">{{i.title}}</td>
<td class="text-center"><label class="label" v-bind:class="{ 'label-danger' : i.stateIndex === 0, 'label-warning' : i.stateIndex === 1, 'label-success' : i.stateIndex === 2 }">{{i.state}}</label></td>
<td class="text-center link"><a v-bind:href="i.link" target="_blank"><i v-bind:class="i.streamingPlatformClass"></i></a></td>
<td class="text-center">{{i.userId}}</td>
<td class="text-center">{{i.streamingPlatformID}}</td>
<td class="text-center"><button v-on:click="removeStream(i.id)" class="btn btn-primary manageStreamButton">Remove</button><button v-on:click="stopStream(i.id)" v-if="i.stateIndex != 2" class="btn btn-primary manageStreamButton">Stop</button></td>
</tr>
In the TD with class "link", I'm trying to conditionally set a href attribute. The "link" property in streams is either a youtube link or an tag with a FB video source. The idea is to make it a clickable link when the link property has a youtube link AND to disable the href attribute when the link property has an tag so it's not clickable. So far I've managed to conditionally alter the href attribute but it still remains clickable and with a link. I know it can be done with onclick return false, but I'm looking for another way. Or if it's possible to remove the tag conditionally, that would be a great solution aswell.