Quote

Getting Started with Ionic

3 Jun

Hello Friends,

Getting Started with ionic seems stressful that some people dropped it after facing installation stage. Well, it is not as stressful as you might be facing or think. It was unfortunate my PC was formatted not quite long, so I intend to getting freshers’ along as I move too. 🙂

Couples of people have asked me how to get started with ionic and installation stage seems to discourage many. Good news on how to get started is here:

Kindly install node JS on your Pc https://nodejs.org/en/download/

For windows (windows 8, 64bit) users it is possible you have an error with node 4.4.5 which is the latest version of node js, so I will suggest you install the 32bit version.

After installing node js, go to node js command prompt on your PC.

Next is to install the current version of Apache Cordova, which will take our app and bundle it into a native wrapper to turn it into a traditional native app.

For windows: npm install -g Cordova

For Others:  $ sudo npm install -g cordova

Windows Users that’ll develop for android should have the following installed and set up.

Java JDK: Install the most recent Java JDK (NOT just the JRE). After installing JDK, create an environment variable on your path (Click windows on your keyboard, type path at search, then click environment variable).

step1

Next, From User Variables for PC create an environment variable for JAVA_HOME pointing to the root folder where the Java JDK was installed. So, if you installed the JDK into C:\Program Files\Java\jdk7, set JAVA_HOME to be this path. After that, add the JDK’s bin directory to the PATH variable as well by finding path under System Variables->click on the path->then click edit-> add ;C:\Program Files\Java\jdk7\bin.

Note that the ; you put before adding your path is to separate the new one from the old paths. Following the previous assumption, this should be either %JAVA_HOME%\bin or the full path C:\Program Files\Java\jdk7\bin

set_environment_variable.PNG

Apache Ant

To install Ant, download a zip from here, extract it, move the first folder in the zip to a safe place, and update your PATH to include the binfolder in that folder. For example, if you moved the Ant folder to c:/, you’d want to add this to your PATH: C:\apache-ant-1.9.2\bin.

Android SDK

Installing the Android SDK is also necessary. The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android.

Cordova requires the ANDROID_HOME environment variable to be set. This should point to the [ANDROID_SDK_DIR]\android-sdk directory (for example c:\android\android-sdk).

Next, update your PATH to include the tools/ and platform-tools/ folder in that folder. So, using ANDROID_HOME, you would add both %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools.

After adding all your paths and installing all these necessities.

Go back to your node command prompt and run the command npm install -g ionic (note that -g means global)

 

After installing ionic, check installation by running ionic –version

 

Thanks to all ionic lovers and hunters. 🙂 iPromise to keep tutorial often

Reference: http://ionicframework.com/docs/guide/installation.html