No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Expression Evaluation
Operators are a subset of those available in JavaScript, and evaluation order and precedence are generally the same as JavaScript. Parentheses enable you to ensure a specific evaluation order. What you may find surprising about expressions is how often they are evaluated. The simplistic answer is, as often as they need to be. A more complete answer is that the framework can notice when things change, and trigger re-rendering of any components that are affected. Dependencies are handled automatically. This is one of the fundamental benefits of the framework. It knows when to re-render something on the page. When a component is re-rendered, any expressions it uses will be re-evaluated.
Action Methods
Expressions are also used to provide action methods for user interface events: onclick, onhover, and any other component attributes beginning with "on". Some components simplify assigning actions to user interface events using other attributes, such as the press attribute on <ui:button>.
Action methods must be assigned to attributes using an expression, for example {!c.theAction}. This assigns an Aura.Action, which is a reference to the controller function that handles the action.
Assigning action methods via expressions allows you to assign them conditionally, based on the state of the application or user interface. For more information, see Example Expressions.