📝 Edit on GitHub
Binding
See v-bind in the docs.
Pass string.
<a href="https://example.com">...</a>
Pass a JS expression. Often a variable name.
<a v-bind:href="url">...</a>
Shorthand:
<a :href="url">...</a>
It could be a value. Note use of :
to process JS such as a value or functional call and not just plain text.
<input :foo="123" />
Pass a boolean.
<input isRequired />
This will appear as isRequired
in the component with a value of true
.
Same as:
<input :isRequired="true" />