Ionic Framework is useful for building mobile apps like Android and iOS. This article will help you to install Node.js, Cordova and Ionic framework on your Ubuntu 18.10, 18.04 and 16.04 LTS system.
Step 1 – Install Node.js
First, use the following commands to install NPM and Node.js on your system. In below commands, the first command will install some required packages on the system. The second command will add PPA for node.js to your system. After that update, your all attached PPA and last command will install Node.js and NPM on your system.
You can visit our tutorial to install latest Node.js on Ubuntu and debian systems.
sudo apt-get install python-software-properties curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install nodejs
Step 2 – Install Cordova
Now use the following command to install Cordova on your system using npm command. It will install all other required node modules on your system.
sudo npm install -g cordova
Step 3 – Install Ionic Framework
Ionic provides and commands line utility for creating packages, build and start applications. Use NPM command to install the Ionic framework on your system.
sudo npm install -g ionic
After completing the installation of the Ionic framework, use the following command to check the installed version.
ionic -v 3.20.0
Step 4 – Create Application with Ionic
Now, You need to create a new Cordova project on your computer using the following command.
ionic start HelloWorld blank
Now use one of the following commands to enable iOS or Android platform. iOS platform will work on MacOS only.
ionic platform add ios ionic platform add android
For more details visit http://ionicframework.com/docs/guide/installation.html