Lets walkthrough the process of getting a Yeoman based AngularJS application up and running inside Cordova/PhoneGap environment on an Android device. While we will cover Android only, the same general steps should apply for an iOS device as well, and the Yeoman project should be able to be shared between the different Cordova projects.
- Android SDK installed and configured (http://developer.android.com/sdk/index.html)
- Ability to build/deploy a basic Android application
- NodeJS Installed (http://nodejs.org/)
- Ruby with Compass gem installed (http://www.ruby-lang.org http://compass-style.org/)
The first step is to set up our initial project structure and Yeoman project base to use as our HTML asset directory.
For full details of Yeoman and it’s setup go to their site at http://yeoman.io/Choose a directory to make your project in and make a few empty directories to follow along with:
Now we can finally get our project going, run the following and accept all the defaults when it asks you a bunch of questions:
and have the tests run and execute (assuming you have Chrome installed) and the ‘dist’ directory should appear as well with the bootstrapped application. So far this has all been pretty basic Yeoman setup work, now we can get this running on our Android device and built along with our standard Android build process. Currently this is setup through the traditional Ant approach, but configuring the newer Gradle build would be even simpler.
To continue reading and finish this article, click here...