Reputation: 6805
How do I name my td class the name of the step in this example?
<td v-for="steps in item.steps" v:bind:class="item.steps.name">
{{ item.steps.name }}
</td>
In this example, my class gets literally named items.steps.name rather than the return value. Everything else works.
Upvotes: 0
Views: 107
Reputation: 487
That's cause you are looping over item.steps with each iteration named steps and you use the variable you are looping over in the class-binding.
Try steps.name instead.
Upvotes: 0