Getting started with ionic framework

Install Ionic

First, install Node.js. Then, install the latest Cordova and Ionic command-line tools. Follow the Android and iOS platform guides to install required platform dependencies.

Note: iOS development requires Mac OS X. iOS simulator through the Ionic CLI requires the ios-sim npm package, which can be installed with the command sudo npm -g install ios-sim.

After installing node.js run this command in your terminal (command prompt) to install ionic

$ npm install -g cordova ionic

Start a project

Ionic provide ready made templates to create basic app.

There are two types of templates available

  1. Tabs

Screen Shot 2016-06-29 at 1.54.49 pm

2. Side Menu

Screen Shot 2016-06-29 at 1.58.05 pm

To create app with default tabs run this command

$ ionic start myApp tabs

Here myApp is the name of the app.

To create app with side menu  run this command

$ ionic start myApp sidemenu

If you don’t want to use their default template then you can also create an empty app by using following command

$ ionic start myApp blank

Testing you app in browser

Navigate to your project folder

cd myApp

ionic serve

ionic serve will start the node server

Testing you app in emulator or device

$ cd myApp
$ ionic platform add android
$ ionic build android
$ ionic emulate android

One thought on “Getting started with ionic framework

  1. Pingback: First Application With Ionic Framework | Coders Home

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s