An expression is any set of literal values, variables, sub-expressions, or operators that can be resolved to a single value. It is used for dynamic output or passing a value into components by assigning them to attributes.
The syntax for an expression is {!expression}. expression is evaluated and dynamically replaced when the component is rendered or when the value is used by the component. The resulting value can be a primitive (integer, string, and so on), a boolean, a JavaScript or Aura object, an Aura component or collection, a controller method such as an action method, and other useful results.
<aura:attribute name="num" type="integer" default="10"/> <ui:inputNumber label="Enter age" aura:id="num" value="{!v.num}"/>
Attribute Name | Attribute Type | Description | Required? |
---|---|---|---|
value | String | The expression to evaluate and render. |