Quantcast
Channel: VueJS use v-for variable as attribute value - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by thanksd for VueJS use v-for variable as attribute value

Interpolation within attributes is not valid in Vue v2.You need to bind the tabindex attribute to the key like so:<a href="#" :tabindex="key">Item {{ key }}</a>Here's a working fiddle.

View Article



VueJS use v-for variable as attribute value

I have an iterative loop that using v-for on an array of objects that then renders a html li item<li class="block" v-for="(section, key) in sectionDetails"><a href="#" tabindex="{{ key...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images