How to Install Ionic Framework on Ubuntu 19.04

661
SHARES
3k
VIEWS

Ionic Framework is useful for building mobile apps like Android and iOS Applications. In this article, you’ll learn how to install ionic framework on Ubuntu 19.04.

Install Node.js

First install NPM and node.js in your system using the following commands

$ sudo apt-get install python-software-properties
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install nodejs

Install Ionic and Cordova

Now install cordova and ionic in your system using following NPM command. It will install all other required node modules on your system.

$ sudo npm i -g cordova ionic

After completing the installation of the Ionic framework, use the following command to check the installed ionic version.

$ ionic -v
 /*
   _             _
  (_) ___  _ __ (_) ___
  | |/ _ \| '_ \| |/ __|
  | | (_) | | | | | (__
  |_|\___/|_| |_|_|\___|  CLI 4.12.0 
*/

Create Application with Ionic

Now, You need to create a new Ionic project on your computer using the following command.

$ ionic start myFirstAPP blank

Now use one of the following commands to enable iOS or Android platform. iOS platform will work on MacOS only.

$ ionic cordova platform add android
$ ionic cordova platform add ios

Test your App on Browser

For running your ionic app on web browser using the following command.

$ ionic serve

The application runs automatically on your web browser: http://localhost:8100/

Test your App on Real Device

For running your app on a real device you need to setup the following

After installation connects your device by USB. Then on your CLI try typing

$ adb devices
/*
List of devices attached
0123456789ABCDEF        device
*/

 if a device is listed, run

$ ionic cordova run android

If nothing appears on adb devices, go to settings on your phone, developer settings, and activate developer mode and USB debugging. You may need to re-plug your device after activating those settings.

Best Resources to learn ionic 4 and angular

Muhammad Mubeen

Muhammad Mubeen

Mubeen is a full-stack web & mobile app developer who is very proficient in MEAN.js, Vue, Python, Ionic 4, Flutter, Firebase, ROR, and PHP. He has created multiple mobile and web applications. He is very passionate about sharing his knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *