Indentation

For indentation at the beginning of the line, use spaces instead of tabs. This helps when copying code as it formats correctly in all editors. Showing whitespace characters helps you see tabs versus spaces

There is a setting in Appcelerator to specify to insert spaces for tabs.

  1. Click the Appcelerator link in the menu.
  2. For a text editor:
    1. Select Preferences.
    2. Select General > Editors > Text Editors.
    3. For Displayed tab width, enter 4.
    4. Check Insert spaces for tabs.
  3. For editing JavaScript:
    1. Select Preferences.
    2. Select General > Studio > JavaScript.
    3. For Tab policy, select Use Spaces.
    4. For Tab size, enter 4.

Related Links

Commerce Cloud Endless Aisle Naming Conventions

Alloy Framework

UI View Types

Global Variables

Lifecycle for Views

Memory Management

Listener Types

Promises

Logging

App Configurations

Themes

Localization