How to install The Ionic 2 Framework?
In this exercise, we will go ahead and see how to install Ionic framework onto your system. The Ionic framework is a robust and feature-rich framework and helps you to do mobile development with ease. Let’s go ahead and see the steps involved in installing the framework.
Installation steps for the Ionic framework
In order to install the framework, the prerequisites are to have NodeJS in your system. So please go ahead and install NodeJS if you already don’t have it on your system.
In the next step lets go ahead and install Ionic framework by following the commands given below:-
npm install -g cordova ionic
Cordova is installed alongside Ionic in order to ease out the process of installation of various Cordova plugins as well as make use of the native features Cordova provides.
Alternatively, in order to get the latest version of Ionic, I will recommend you to use the following command. This will get you the latest build.
npm install -g ionic@latest
Once your installation is done. Please go ahead and use the following command to check the version of Ionic Framework installed in order to confirm the installation.
Creating a sample application using Ionic Framework
In order to create an Ionic application follow the steps mentioned below:-
ionic start sampleApp tabs
This should help you to start the server which is inbuilt with the project and is already linked up so as to provide an easy access to the app. This step should ideally give a URL which when opened up provides you with the live running Ionic application.
You can see how simple it was to install the Ionic framework and scaffolding the project was just a breeze.
NOTE : There is an argument that can be used along with the creation of the app so that one can use Ionic 1.
ionic start sampleApp tabs --type ionic1