Vue · Junior · Question 7 of 75

How do you bind an attribute to a JavaScript value?

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.

Further reading

Problem with a question

Vue · Junior · question 7

Test yourself

Take the Vue · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz