Newer Version Available

This content describes an older version of this product. View Latest

Apex Server-Side Controller Overview

Create a server-side controller in Apex and use the @AuraEnabled annotation to enable client- and server-side access to the controller method.
Only methods that you have explicitly annotated with @AuraEnabled are exposed.

Don't store component state in your controller. Store it in a component's attribute instead.

Tip

This Apex controller contains a serverEcho action that prepends a string to the value passed in.