Environment
AotP is currently in Pilot. Please contact Salesforce to sign-up for a sandbox org on gs0. You will get a standard Developer Edition license with Aura on the Platform enabled.
Namespaces
Aura uses namespaces extensively for encapsulation. Every component needs to have namespace prefixed like <myNamespace:componentName>
. For example Aura uses ui:
for ui-elements <ui:inputFieldText>
like input fields and aura:
for others like: <aura:handler>
, <aura:event>
etc. So register a unique namespace for your org. Create a namespace using Setup.
- Navigate to Setup
- Select Create > Packages
- Click Edit
- Click Continue to agree
- Enter namespace and click Check Availability
- Click Review My Selections
- Click Save
Using Namespaces
- Every component must be namespace prefixed.
- You will have to use your own unique namespace for components you build like:
<myNamespace:componentName>
. - Namespaces are also used in the url for any Aura apps:
http://<mySalesforceInstance>/<namespace>/<app>.app
Copying ComponentsWhen you manually copy code from tutorials and other places, you’ll have to manually change it’s namespace to yours.
Aura Debug Mode
By default Aura minifies JavaScript and CSS code which makes it impossible to debug during development. So make sure to enable Debug mode.
- Navigate to Setup > Create > Packages
- Check
Enable Aura Debug Mode