The syntax for the Expression is {!expression}. The Expression syntax can be used inside the Component Markup. Let's take a look at the following table to see the syntax for Expressions in different scenarios:
Expression Example | Syntax | Example Code |
Expression to reference a value from an attribute | {!v.attributeName} |
<aura:component> |
Expression for calling client-side controller actions | {!c.handleClick} |
<Lightning:button label="Framework Button" onclick="{!c.handleClick}"/> |
Expression operator | The operators supported are listed in the standard docs. Please refer to: https://developer.Salesforce.com/docs/atlas.en-us.Lightning.meta/Lightning/expr_operators.htm |
<aura:component> |
Expression function | The supported functions are listed here: https://developer.Salesforce.com/docs/atlas.en-us.Lightning.meta/Lightning/expr_functions.htm |
<aura:component> |
To become familiar with all the operators and functions, refer to the Lightning Component Developer guide documentation at: https://developer.Salesforce.com/docs/atlas.en-us.Lightning.meta/Lightning/expr_overview.htm