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 |
| <aura:component> <aura:attribute name="searchString" type="String" default="lighnting components"/> <p>{!v.searchString}</p> </aura:component> |
Expression for calling client-side controller actions |
| <Lightning:button label="Framework Button" onclick="{!c.handleClick}"/> The client-side JavaScript controller will be as following ({ handleClick : function(component, event) { } }) |
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> <... |