Set Dynamic HTML Attributes: x-bind
Learn to dynamically bind the result of JavaScript expressions to HTML attributes.
We'll cover the following...
We'll cover the following...
The x-bind directive allows us to set HTML attributes with the result of JavaScript expressions. The syntax for x-bind takes the form x-bind:[attribute]='Attribute value', where [attribute] is the HTML attribute we want to dynamically bind Attribute value to.
The example below shows how to set the value attribute of an input element:
Line 7 of the code above sets the value ...