Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Creating an Apex Server-Side Controller
Use the Developer Console to create an Apex server-side controller.
- Open the Developer Console.
- Click .
- Enter a name for your server-side controller.
- Click OK.
-
Enter a method for each server-side action in the body of the class.
Add the @AuraEnabled annotation to a method to expose it as a server-side action. Additionally, server-side actions must be static methods, and either global or public.
- Click .
- Open the component that you want to wire to the new controller class.
-
Add a controller system attribute to the <aura:component> tag to wire the component to the
controller. For example:
1<aura:component controller="SimpleServerSideController">