Vue · Junior · Question 7 of 75
How do you bind an attribute to a JavaScript value?
- ✓Correct answer:
v-bind:href="url"or the shorthand:href="url" - 2
href="{{ url }}" - 3
[href]="url"
Explanation
Mustaches don't work in attributes. :disabled="isSaving" passes a boolean, and since Vue 3.4 :href="href" can be shortened to :href when the variable has the same name.