I’m trying to set a dynamic class in a vue.js, something like
<strong :class=`color-${category.level}`>{{ category.name }}</strong>
this html is inside a for loop and I need the category.value on this loop but it’s not working
>Solution :
The bound class value should be wrapped by quotes :class='...' or double-quotes :class="..." :
<strong :class="`color-${category.level}`"></strong>