aura:expression

Renders the value to which an expression evaluates. Creates an instance of this component which renders the referenced "property reference value" set to the value attribute when expressions are found in free text or markup.

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.

An expression uses a value provider to access data and can also use operators and functions for more complex expressions. Value providers include m (data from model), v(attribute data from component), and c (controller action). This example show an expression {!v.num} whose value is resolved by the attribute num.
<aura:attribute name="num" type="integer" default="10"/>
<ui:inputNumber label="Enter age" aura:id="num" value="{!v.num}"/>

Attributes

Attribute Name Attribute Type Description Required?
value String The expression to evaluate and render.