Book Image

PhoneGap 4 Mobile Application Development Cookbook

Book Image

PhoneGap 4 Mobile Application Development Cookbook

Overview of this book

Table of Contents (19 chapters)
PhoneGap 4 Mobile Application Development Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Getting familiar with basics of the library


There are several ways to get started using Ionic Framework. The easiest way is to utilize Ionic CLI, which is an NPM package. NPM is a dependency manager for Node.js.

How to do it...

Perform the following steps to get started with Ionic framework:

  1. Install Ionic CLI by running the following command in the terminal. You may need super user access:

    npm install -g cordova ionic
    
  2. If somehow Ionic is not installed, you may require root access:

    sudo npm install -g cordova ionic
    
  3. Check your installation by running the following command:

    ionic -v
    

    If you see following output, Ionic has been installed on your machine:

  4. Create a new Ionic app project by using a readymade template:

    ionic start myapp tabs
    
  5. Run the project by using the following command; you can change ios to android if you want to emulate on Android instead:

    cd myapp
    ionic platform add ios
    ionic build ios
    ionic emulate ios
    
  6. Your Ionic app is running on the emulator:

Congratulations! You have successfully...