Answer the question
In order to leave comments, you need to log in
Why does it swear at Unexpected 'v-bind' before ':'?
I tried instead of template and insert key and bind = everything is super.
But I don't need to wrap everything in a div...
and throws two errors
error Unexpected 'v-bind' before ':' vue/v-bind-style
error Elements in iteration expect to have 'v-bind:key' directives vue/ require-v-for-key
<template
v-for="start in starts"
>
<input
:id="input_q + '-star-' + start.id"
:name="input_q"
:value="start.id"
v-bind:key="start.id"
type="radio"
>
<label
:for="input_q+'-star-'+start.id"
>{{ start.id }}</label>
</template>
Answer the question
In order to leave comments, you need to log in
v-bind:
it's the same as :
. And key
should stand on each iterable element. Unique for each element. This is obvious, if you understand why the hell it is needed at all (to update only those pieces that have really been updated and save those that have not changed).
Those. key
you need more and label
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question