Create Hybrid app Using
angular js and Ionic
Introduction to Ionic.
Ionic is open source Hybrid mobile application development framework .it help us to
build Hybrid mobile app by using HTML,JS and CSS . Ionic Built on top of AngularJS
that means we can use all pre-existing angular js code to immediate use in Ionic. Ionic
is essentially a wrapper around the already very popular Apache Cordova framework
.The Ionic framework also comes with a set of very well designed UI components, uses
Bower & NPM and is written in AngularJS and SASS (optional), which are some of the
most popular tools and frameworks out there and most likely key to Ionics popularity.
Introduction to AngularJS
AngularJS is a JavaScript frameworks for creating a single page application developed
by google . It's a structural framework for creating dynamic web applications by
extending HTML capabilities. By using this framework you can take advantage of some
of the built-in features and with AngularJS you can reduce your application code by
using these concept like templating, filters, two-way data-binding and more.
Getting Started With AngularJS
Let's start with a simple HelloWorld AngularJS App
Here I will discuss AngularJS by creating a simple Web project. Use the following
procedure:
Download AngularJS from: https://angularjs.org/.
Download Bootstrap from: Download Bootstrap.
Just setup your angularJS project in three step and you can use any HTML editor or
IDE for the angularJS application development.
Step 1 : Create one HTML Project .
Step 2 : create one script folder inside of project and paste your angular.min.js
file inside the folder .
Step 2 : Paste Bootstrap CSS ,JS and fonts Folder inside of Project
Your Project solution will look like as below Image.
Here I am just going to create one simple hello world Application, so in this project only
we need angularJs.min.js file Reference only. In future we will do other sample using
Bootstrap with Ionic.
<!doctype html>
<html ng-app>
<head>
<script src="Scripts/angular.min.js"></script>
</head>
<body>
<div>
<input type="text" ng-model="yourName" placeholder="Enter a
name here">
<h1>Hello, {{ yourName }}!</h1>
</div>
</body>
</html>
What is Cordova?
Apache Cordova is a platform for building native mobile applications using HTML, CSS
and JavaScript .it provide javascript that wrap native api of device such as camera,
geolocation on the actual mobile device .cordova is cross platform so we can access it
on popular mobile os like android, windows or ios device .Cordova launcher can be
used to write code consistent api that can be use every ware.
Getting Started with Ionic
Before Installing a Ionic you must have nodejs install in your pc because Ionic is an
NPM package, so make sure you have NPM installed and then run:
Just flow few Step to setup Ionic environment in your machine.
Step1: Download and install NodeJS from http://nodejs.org/
Step2: open NodeJS Command prompt and run this command $ npm install -g ionic
Step3 : now you need to install cordova for that run on same command prompt npm
install cordova -g
Reference
http://ionicframework.com/getting-started/