Creating Angular projects
Titanium Angular projects are created using a new Angular project template. Open your terminal and run the following command to create a new project that uses the Angular template:
// appc-cli appc new -t app --ng // ti-cli ti create -t app --template angular-default |
With the --ng
option, you instruct the Appc CLI to use the Angular template when
creating the new project. You can use all other available options to customize
the creation of your new project (see the Command-Line Interface Reference).
Running Angular projects
To build and run your Angular based project, use the following command as usual (from your project root directory):
appc run -p [android|ios] |
There are no extra steps you need to do to build and run an Angular enabled project. Compilation of the TypeScript source and bundling is automatically done during Titaniums build steps.
Appendix and tips
Selecting a code editor
You can develop a Titanium Angular project in any code editor you like. Edit your app's source files and run the above command to build and run your Angular project and you are good to go. However, we recommend you to use an editor which makes use of TypeScripts additional type information. For example, take a look at Visual Studio Code which is a fast and extendible editor with excellent TypeScript support backed by Microsoft. Add our Titanium extension and you are all set.
Another good alternative is Atom with the appcelerator-titanium and TypeScript packages.