complete Ionic 3 framework setup
What is ionic ?
Ionic is an HTML5 mobile app development framework targeted at building hybrid mobile apps. Hybrid apps means which runs in all platform like android, ios and window. you have to write code in one time in ionic framework and your app run in all platform.
Ionic apps are created and developed using ionic command line utility and cordova is used for building or deploying native app.
before install ionic, we need to install node and npm. Most of the tooling in the CLI is based on Node and is managed through npm. you can install node and npm through the NodeJS installer.
after install node and npm, open terminal through press window button + ‘r’ key in keyboard and write cmd than press enter key. To verify you have everything installed correctly, write this command
--version your screen will look like this.
npm--version for npm.
In above screens
v8.9.4 is node version and
5.6.0 is npm version. may be your version will be different.
Ionic CLI and Cordova
let’s install the Ionic and Cordova CLI with the help of npm.
> npm install -g ionic cordova
-gstands for global, which means this is a global install we can use this ionic command globally, so for Windows you will need to open an Admin command prompt. For Mac/Linux, you might need to run the command with
please wait until installation is finished. once it finished then we can create Ionic app.
now we have to create our first ionic app and let’s start please run this command.
> ionic start myFirstApp blank
- start – will tell the CLI create a new app.
- myFirstApp – will be the directory name and the app name from your project.
- blank – will be the starter template for your project.
Now, you have to cd into the folder that was created.
> cd myFirstApp/
we can launch our app in the browser, use the serve command.
> ionic serve