Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PhoneGap and AngularJS for Cross-platform Development

You're reading from   PhoneGap and AngularJS for Cross-platform Development Build exciting cross-platform applications using PhoneGap and AngularJS

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783988921
Length 122 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Yuxian E Liang Yuxian E Liang
Author Profile Icon Yuxian E Liang
Yuxian E Liang
Eugene Liang Eugene Liang
Author Profile Icon Eugene Liang
Eugene Liang
Arrow right icon
View More author details
Toc

Command-line interface for both Android and iOS

Once you have finished installing the individual platforms, it's time to move on to the command-line interface. This section contains the most important commands for the command-line interface. To start off, you need to install Node.js (www.nodejs.org). Once you have installed node.js, perform the following steps:

  1. Run the npm –g install cordova command. This installs the command-line interface on your computer.
  2. Change the directory to the place where you will be saving your project files for this chapter.
  3. Once in the directory, issue the cordova create todo com.project.todo ToDo command. This will create a folder containing your basic files for PhoneGap.
  4. Now, change directory to /todo.
  5. Once in the directory, we need to install the various platforms we will be supporting:
    • For iOS, use the cordova platform add ios command
    • For Android, use the cordova platform add android command
  6. Now, let's try to run the Hello World example in Android...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image