Thursday 22 June 2017

Ionic 2.0 Installation

Ionic apps are created and developed primarily through the Ionic command line utility (the “CLI”), and use Cordova to build and deploy as a native app. This means we need to install a few utilities to get developing.

$ npm install -g ionic cordova
(if Mac system then add sudo in front of npm & install nodejs)
(nodejs is mandatory for intalling ionic and angualrjs)

ionic start firstapp

cd firstapp

To run ionic application
$ ionic serve

You need to add any platform like andoid, ios
use the following command:

ionic cordova platform add ios
ionic cordova platform add android

To generate apk the run the following command:
ionic cordova build android

To add any native plugin then add the following command

sudo ionic cordova plugin add phonegap-plugin-barcodescanner


npm install --save @ionic-native/barcode-scanner


Reference Link: Click Here


             Angualr 2.0 Installation

 npm install -g @angular/cli
(if mac system then include sudo before npm)
(before install angular2, first need to install nodejs)

ng new firstapp
cd firstapp

then add 
alias ng="/usr/local/lib/node_modules/@angular/cli/bin/ng
(this command is for assigning your node js npm & ng to current project)

To run angualr2 Application 

ng serve --open

Reference Link: Click Here


         Angualr 1.0 with bower & gulp setup

      install nvm (node version manager)


ii.      curl-o­-https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash

iii.          source ~/.profile

iv.         nvm ­­version

v.        nvm ls­remote

2.     install your desired version of node

i.         nvm install v4.2.2

ii.         node ­­version

iii.          nvm alias default 5.1(version u need)


3.   install git

i.         sudo apt­get install git

ii.         git ­­version

4.     install yeoman, bower and gulp

i.         http://yeoman.io/codelab/setup.html

ii.        npm install ­­global yo bower grunt­cli or npm install ­­global yo bower gulp

iii.          yo ­­version && bower ­­version && gulp ­­version

5.     install angular generator

i.         npm install ­g generator­gulp­angular

ii.         If needed, npm install ­g generator­karma

6.     create a folder

i.         mkdir angular & cd angular

7.     initiate yo

i.         yo ( click Gulp Angular) or yo gulp­angular

ii.         all app,dist,bower folders will be created

8.   start gulp


i.         gulp serve




No comments:

Post a Comment