Answers for "add active class when element exists into an array vuejs"

0

add active class when element exists into an array vuejs

<li v-for="(tag, index) in tags" :key="index" :class="{active: tag.active}">
    <a href="#" @click.prevent="tag.active = !tag.active">{{ tag.name }}</a>
</li>
Posted by: Guest on January-12-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language