Ionic

From Jon's Wiki
Revision as of 00:45, 23 November 2014 by Johnno (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installation

Following the Getting started guide[1] the install is:

sudo apt-get install npm openjdk-7-jdk ant
npm install -g cordova ionic

Grab the Android SDK bundle:

cd ~/projects
wget https://dl.google.com/android/adt/adt-bundle-linux-x86_64-xxxx.zip
unzip adt-bundle-linux-x86_64-[↹].zip
mv adt-bundle-linux-x86_64-[↹] android

Add the ADK tools to your PATH by editing ~/.bashrc:

export PATH=$PATH:/home/me/projects/android/platform-tools:/home/me/projects/android/sdk/tools

Try out hello world

ionic start hello tabs
cd hello

Tips

  • Setup this project to use Sass:
     ionic setup sass 
  • Develop in the browser with live reload:
     ionic serve 
  • Add a platform (ios or Android):
     ionic platform add [ios | android] 
    (iOS requires OSX)
  • Build your app:
     ionic build <PLATFORM> 
  • Simulate your app:
     ionic emulate <PLATFORM> 
  • Run your app on a device:
     ionic run <PLATFORM> 
  • Package an app using Ionic package service:
     ionic package <MODE> <PLATFORM> 

For more help use ionic --help or visit the Ionic docs.


Links

Notes

  1. "Getting started with Ionic", Ionic Framework.