Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more simple usage examples of Alloy, go to the alloy/test/app directory on the Alloy GitHub project.

To use the sample applications from the GitHub project, first clone the project:

Code Block
languagenone
git clone https://github.com/appcelerator/alloy

Using Titanium Studio:

  1. Create a new Alloy project.
  2. Select File > Import.
  3. Select General > File System and click the Next button. The Import dialog appears.
  4. Click the first Browse button (From directory), then navigate to a test application in the cloned Alloy project and click the Open button.  For example, if you want to import the Master-Detail application, select alloy/test/apps/advanced/master_detail/.
  5. Select all folder and files, that is, make sure they are all checkmarked.
  6. Click the second Browse button (Into folder), then navigate to your project's app directory and click the OK button.
  7. Click the Finish button.  The sample application is imported in your project and you can run it.

Using the Titanium CLI, run the following commands:

Code Block
languagenone
ti create --name ProjectName
cd ProjectName
alloy new
cp -r <path_to_alloy_git_repo>/test/apps/<path_to_app>/* .
ti build

Next Steps

Review Alloy Concepts to learn more about Alloy and how to structure your project.  From there, visit the links on Alloy Views, Alloy Controllers, and Alloy Models to learn how to write views, controllers and models, respectively.