Phonegap and AngularJS

Neev Technologies
Neev TechnologiesNeev Technologies
Phonegap and AngularJS
– A Getting Started Guide
Set up Android Environment
● Install Apache Ant http://ant.apache.org
● Download ADT from http://developer.android.com/sdk/installing/bundle.html
● Configure $PATH to include

– <adt_path>/tools
– <adt_path>/sdk/platform-tools
– Apache ant
● Run Android from command line
● Download API 19
● Create atleast one AVD http://developer.android.com/tools/devices/managingavds.html
Set up iOS Environment

● Download and install Xcode
● Run Xcode and accept the license

agreement.
Set up NodeJS

● Download NodeJS from http://nodejs.org
● Install NodeJS in /usr or /usr/local
● Check if NodeJS is working
● 'node' and 'npm' should be working
Install Cordova

● Install Cordova using npm (Node Package
Manager)
– sudo npm install cordova -g
Create Cordova Project

● cordova create CordovaDemo
com.neevtech.cordovademo
● cordova platform add android

● cordova platform add ios
Add Necessary Plugins

● cordova plugin add
org.apache.cordova.device
● cordova plugin add

org.apache.cordova.geolocation
● cordova plugin ls
Setting up Jquery & Bootstrap 3
● Download bootstrap 3 from
http://getbootstrap.com
● Add bootstrap.min.css to www/css
● Add bootstrap.min.js to www/js
● Add fonts fonts folder to www
● Add jquery.min.js from http://jquery.com to

www/js
WWW Folder
Set up AngularJS
● Download AngularJS from http://angularjs.org
● Download angular-routes

http://code.angularjs.org/<angular_version>/
angular-route.js
● Copy to www/js folder
WWW Folder
Modify Index.HTML to add CSS and JS
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●

<html ng-app=”cordovaApp”>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See
https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<title>Cordova Demo</title>
</head>
<body ng-controller="SuperController">
<div class=”container” ng-view=""></div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
● <script type="text/javascript" src="js/angular_route.min.js"></script>
</body>
</html>
Add Phonegap Module
● Add Phonegap module from
https://github.com/mstaessen/angular-

phonegap/blob/master/src/PhoneGap.js to
www/js
● Add the reference script tag in index.html
Create app.js in www/js and Add to index.html
●
●

'use strict';
var cordovaApp = angular.module('cordovaApp', ['ngRoute','PhoneGap']);

●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●

cordovaApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'partials/welcome.html',
controller: 'WelcomeCtrl'
});
$routeProvider.
when('/login', {
templateUrl: 'partials/login.html',
controller: 'LoginCtrl'
});
$routeProvider.
otherwise({
redirectTo: '/'
});
}

●

]);
Create HTML Files
● Create partials folder under html
● Create welcome.html under partials
● <div class="jumbotron">
● Welcome to Cordova App
● </div>
● <button ng-click=”gotoLogin()” ngshow=”isAppLoaded”>Go to Login</button>
Create Super Controller

● cordovaApp.controller('SuperController',
●

function SuperController($scope,
$location, PhoneGap) {

●
● }
● );
Creating WelcomeCtrl
● cordovaApp.controller('WelcomeCtrl',

●
function WelcomeCtrl($scope, $location, PhoneGap) {
●
$scope.isAppLoaded = false;
● // to detect if app is loaded
●
PhoneGap.ready().then(function() {
●
alert("App loaded");
●
$scope.isAppLoaded = true;
●
});
●

$scope.gotoLogin = function() {

●
$location.url('/login');
●
};
●
}
● );
Create Login html
● Create login.html in partials folder.
● <form role="form">
● <div class="form-group">
● <label for="exampleInputEmail1">Email address</label>
● <input type="email" ng-model="email" class="form-control"
id="exampleInputEmail1" placeholder="Enter email">
● </div>
● <div class="form-group">
● <label for="exampleInputPassword1">Password</label>
● <input type="password" ng-model="password" class="form-control"
id="exampleInputPassword1" placeholder="Password">
● </div>
● <button type="submit" ng-click="showVals()" class="btn btndefault">Submit</button>
● </form>
Create LoginCtrl
● cordovaApp.controller('LoginCtrl',
●
●

function LoginCtrl($scope, $location, PhoneGap) {
$scope.showVals = function() {

●

●
};
● }
● );

alert($scope.email + " " + $scope.password);
Add Controller Links to index.html
Cordova Build

●cordova build android

●cordova emulate android
Yippie!!
The supporting code
is available here.
About Neev
Web

Mobile

Magento eCommerce
SaaS Applications

Video Streaming Portals
Rich Internet Apps
Custom Development

iPhone
Android
Windows Phone 7

HTML5 Apps

Cloud
AWS Consulting Partner
Rackspace
Joyent
Heroku
Google App Engine

Key Company Highlights
250+ team with
experience in managing
offshore, distributed
development.
Neev Technologies
established in Jan ’05

User Interface Design and User Experience Design

VC Funding in 2009 By
Basil Partners

Performance Consulting Practices

Part of Publicis Groupe

Quality Assurance & Testing

Member of NASSCOM

Outsourced Product Development

Offices at Bangalore and
Pune
A few Clients
Partnerships
sales@neevtech.com

Neev Information Technologies Pvt. Ltd.
India - Bangalore

India - Pune

The Estate, # 121,6th Floor,

#13 L’Square, 3rd Floor

Dickenson Road

Parihar Chowk, Aundh,

Bangalore-560042

Pune – 411007.

Phone :+91 80 25594416

Phone : +91-64103338

For more info on our offerings, visit www.neevtech.com
1 of 26

Recommended

React django by
React djangoReact django
React djangoHeber Silva
252 views27 slides
Mojolicious by
MojoliciousMojolicious
MojoliciousMarcus Ramberg
4.4K views56 slides
jQuery Internals + Cool Stuff by
jQuery Internals + Cool StuffjQuery Internals + Cool Stuff
jQuery Internals + Cool Stuffjeresig
6.1K views37 slides
Lecture: Webpack 4 by
Lecture: Webpack 4Lecture: Webpack 4
Lecture: Webpack 4Sergei Iastrebov
216 views39 slides
Packing it all: JavaScript module bundling from 2000 to now by
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowDerek Willian Stavis
755 views126 slides
An Intro into webpack by
An Intro into webpackAn Intro into webpack
An Intro into webpackSquash Apps Pvt Ltd
1.1K views20 slides

More Related Content

What's hot

webpack 101 slides by
webpack 101 slideswebpack 101 slides
webpack 101 slidesmattysmith
695 views17 slides
Let Grunt do the work, focus on the fun! [Open Web Camp 2013] by
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Dirk Ginader
20.7K views84 slides
Building a js widget by
Building a js widgetBuilding a js widget
Building a js widgetTudor Barbu
990 views44 slides
以Vue開發電子商務網站
架構與眉角 by
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角Mei-yu Chen
3.2K views49 slides
Modern frontend development with VueJs by
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJsTudor Barbu
1.6K views38 slides
Webpack slides by
Webpack slidesWebpack slides
Webpack slidesАндрей Вандакуров
4.7K views33 slides

What's hot(10)

webpack 101 slides by mattysmith
webpack 101 slideswebpack 101 slides
webpack 101 slides
mattysmith695 views
Let Grunt do the work, focus on the fun! [Open Web Camp 2013] by Dirk Ginader
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
Dirk Ginader20.7K views
Building a js widget by Tudor Barbu
Building a js widgetBuilding a js widget
Building a js widget
Tudor Barbu990 views
以Vue開發電子商務網站
架構與眉角 by Mei-yu Chen
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
Mei-yu Chen3.2K views
Modern frontend development with VueJs by Tudor Barbu
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJs
Tudor Barbu1.6K views
Testing frontends with nightwatch & saucelabs by Tudor Barbu
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Tudor Barbu1.4K views
How to Build SPA with Vue Router 2.0 by Takuya Tejima
How to Build SPA with Vue Router 2.0How to Build SPA with Vue Router 2.0
How to Build SPA with Vue Router 2.0
Takuya Tejima18.5K views

Similar to Phonegap and AngularJS

Mobile app with cordova by
Mobile app with cordovaMobile app with cordova
Mobile app with cordovaCandice Zhuang
173 views9 slides
Mobile app with cordova by
Mobile app with cordovaMobile app with cordova
Mobile app with cordovaYu-Hsuan Chuang
356 views9 slides
Cross-Platform Mobile Development with Ionic Framework and Angular by
Cross-Platform Mobile Development with Ionic Framework and AngularCross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and AngularMovel
1.9K views65 slides
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde by
Frida  Android run time hooking - Bhargav Gajera & Vitthal ShindeFrida  Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida Android run time hooking - Bhargav Gajera & Vitthal ShindeNSConclave
839 views29 slides
Cross Platform Mobile App Development by
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
2.8K views14 slides
Angular JS Basics. by
Angular JS Basics.Angular JS Basics.
Angular JS Basics.Tharindu Prabhath Ranathunga
463 views13 slides

Similar to Phonegap and AngularJS(20)

Cross-Platform Mobile Development with Ionic Framework and Angular by Movel
Cross-Platform Mobile Development with Ionic Framework and AngularCross-Platform Mobile Development with Ionic Framework and Angular
Cross-Platform Mobile Development with Ionic Framework and Angular
Movel1.9K views
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde by NSConclave
Frida  Android run time hooking - Bhargav Gajera & Vitthal ShindeFrida  Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde
NSConclave839 views
Cross Platform Mobile App Development by Annmarie Lanesey
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
Annmarie Lanesey2.8K views
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio... by Olivier Destrebecq
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
Olivier Destrebecq620 views
Cloud api之應用與實例 by Simon Su
Cloud api之應用與實例Cloud api之應用與實例
Cloud api之應用與實例
Simon Su885 views
Hacking pokemon go [droidcon tel aviv 2016] by Guy Lis
Hacking pokemon go [droidcon tel aviv 2016]Hacking pokemon go [droidcon tel aviv 2016]
Hacking pokemon go [droidcon tel aviv 2016]
Guy Lis744 views
Working with the AOSP - Linaro Connect Asia 2013 by Opersys inc.
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.5.1K views
Android UI Testing with Appium by Luke Maung
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung10.9K views
Grunt & Front-end Workflow by Pagepro
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
Pagepro739 views
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202... by GoQA
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
GoQA49 views
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0 by Frost
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost 154 views
Inside Android's UI / ABS 2013 by Opersys inc.
Inside Android's UI / ABS 2013Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013
Opersys inc.1.1K views
Extending CMS Made Simple by cmsmssjg
Extending CMS Made SimpleExtending CMS Made Simple
Extending CMS Made Simple
cmsmssjg13.2K views
SF Grails - Ratpack - Compact Groovy Webapps - James Williams by Philip Stehlik
SF Grails - Ratpack - Compact Groovy Webapps - James WilliamsSF Grails - Ratpack - Compact Groovy Webapps - James Williams
SF Grails - Ratpack - Compact Groovy Webapps - James Williams
Philip Stehlik1.4K views
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1... by Igalia
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...
Igalia1.1K views

More from Neev Technologies

Razorfish India (Neev) Corporate Profile by
Razorfish India (Neev) Corporate ProfileRazorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate ProfileNeev Technologies
1.4K views48 slides
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev by
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ NeevAdobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ NeevNeev Technologies
2.6K views17 slides
Hybris Hackathon - Split Payments in Hybris by
Hybris Hackathon - Split Payments in HybrisHybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in HybrisNeev Technologies
2.9K views15 slides
Hybris Hackathon - Data Modeling by
Hybris Hackathon - Data ModelingHybris Hackathon - Data Modeling
Hybris Hackathon - Data ModelingNeev Technologies
11.3K views23 slides
RazorfishNeev Engagement Process by
RazorfishNeev Engagement ProcessRazorfishNeev Engagement Process
RazorfishNeev Engagement ProcessNeev Technologies
994 views22 slides
Gameathon @ Neev by
Gameathon @ NeevGameathon @ Neev
Gameathon @ NeevNeev Technologies
764 views16 slides

More from Neev Technologies(20)

Razorfish India (Neev) Corporate Profile by Neev Technologies
Razorfish India (Neev) Corporate ProfileRazorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate Profile
Neev Technologies1.4K views
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev by Neev Technologies
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ NeevAdobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev
Neev Technologies2.6K views
Hybris Hackathon - Split Payments in Hybris by Neev Technologies
Hybris Hackathon - Split Payments in HybrisHybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in Hybris
Neev Technologies2.9K views
Building A Jewelry e-store - Now, sell your jewelry to the world! by Neev Technologies
Building A Jewelry e-store - Now, sell your jewelry to the world!Building A Jewelry e-store - Now, sell your jewelry to the world!
Building A Jewelry e-store - Now, sell your jewelry to the world!
Neev Technologies973 views
How to add Custom Font to your iOS-based App? by Neev Technologies
How to add Custom Font to your iOS-based App?How to add Custom Font to your iOS-based App?
How to add Custom Font to your iOS-based App?
Neev Technologies935 views
Our Experience on Google Map Integration with Apps by Neev Technologies
Our Experience on Google Map Integration with AppsOur Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with Apps
Neev Technologies1.1K views
Neev Application Performance Management Services by Neev Technologies
Neev Application Performance Management ServicesNeev Application Performance Management Services
Neev Application Performance Management Services
Neev Technologies779 views
Business Intelligence Capabilities @ Neev by Neev Technologies
Business Intelligence Capabilities @ NeevBusiness Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ Neev
Neev Technologies751 views
Neev Conversion Strategy Capabilities by Neev Technologies
Neev Conversion Strategy CapabilitiesNeev Conversion Strategy Capabilities
Neev Conversion Strategy Capabilities
Neev Technologies1.2K views
A Digital Mirror for Luxury Jewelry Stores by Neev Technologies
A Digital Mirror for Luxury Jewelry StoresA Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry Stores
Neev Technologies1.7K views

Recently uploaded

Roadmap to Become Experts.pptx by
Roadmap to Become Experts.pptxRoadmap to Become Experts.pptx
Roadmap to Become Experts.pptxdscwidyatamanew
14 views45 slides
AMAZON PRODUCT RESEARCH.pdf by
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdfJerikkLaureta
19 views13 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
79 views25 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
126 views17 slides
Info Session November 2023.pdf by
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdfAleksandraKoprivica4
11 views15 slides
Report 2030 Digital Decade by
Report 2030 Digital DecadeReport 2030 Digital Decade
Report 2030 Digital DecadeMassimo Talia
15 views41 slides

Recently uploaded(20)

AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta19 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi126 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price19 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson66 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn21 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software257 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma31 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst476 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院

Phonegap and AngularJS

  • 1. Phonegap and AngularJS – A Getting Started Guide
  • 2. Set up Android Environment ● Install Apache Ant http://ant.apache.org ● Download ADT from http://developer.android.com/sdk/installing/bundle.html ● Configure $PATH to include – <adt_path>/tools – <adt_path>/sdk/platform-tools – Apache ant ● Run Android from command line ● Download API 19 ● Create atleast one AVD http://developer.android.com/tools/devices/managingavds.html
  • 3. Set up iOS Environment ● Download and install Xcode ● Run Xcode and accept the license agreement.
  • 4. Set up NodeJS ● Download NodeJS from http://nodejs.org ● Install NodeJS in /usr or /usr/local ● Check if NodeJS is working ● 'node' and 'npm' should be working
  • 5. Install Cordova ● Install Cordova using npm (Node Package Manager) – sudo npm install cordova -g
  • 6. Create Cordova Project ● cordova create CordovaDemo com.neevtech.cordovademo ● cordova platform add android ● cordova platform add ios
  • 7. Add Necessary Plugins ● cordova plugin add org.apache.cordova.device ● cordova plugin add org.apache.cordova.geolocation ● cordova plugin ls
  • 8. Setting up Jquery & Bootstrap 3 ● Download bootstrap 3 from http://getbootstrap.com ● Add bootstrap.min.css to www/css ● Add bootstrap.min.js to www/js ● Add fonts fonts folder to www ● Add jquery.min.js from http://jquery.com to www/js
  • 10. Set up AngularJS ● Download AngularJS from http://angularjs.org ● Download angular-routes http://code.angularjs.org/<angular_version>/ angular-route.js ● Copy to www/js folder
  • 12. Modify Index.HTML to add CSS and JS ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● <html ng-app=”cordovaApp”> <head> <meta charset="utf-8" /> <meta name="format-detection" content="telephone=no" /> <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> <meta name="viewport" content="width=device-width" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> <title>Cordova Demo</title> </head> <body ng-controller="SuperController"> <div class=”container” ng-view=""></div> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/bootstrap.min.js"></script> <script type="text/javascript" src="js/angular.min.js"></script> ● <script type="text/javascript" src="js/angular_route.min.js"></script> </body> </html>
  • 13. Add Phonegap Module ● Add Phonegap module from https://github.com/mstaessen/angular- phonegap/blob/master/src/PhoneGap.js to www/js ● Add the reference script tag in index.html
  • 14. Create app.js in www/js and Add to index.html ● ● 'use strict'; var cordovaApp = angular.module('cordovaApp', ['ngRoute','PhoneGap']); ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● cordovaApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/', { templateUrl: 'partials/welcome.html', controller: 'WelcomeCtrl' }); $routeProvider. when('/login', { templateUrl: 'partials/login.html', controller: 'LoginCtrl' }); $routeProvider. otherwise({ redirectTo: '/' }); } ● ]);
  • 15. Create HTML Files ● Create partials folder under html ● Create welcome.html under partials ● <div class="jumbotron"> ● Welcome to Cordova App ● </div> ● <button ng-click=”gotoLogin()” ngshow=”isAppLoaded”>Go to Login</button>
  • 16. Create Super Controller ● cordovaApp.controller('SuperController', ● function SuperController($scope, $location, PhoneGap) { ● ● } ● );
  • 17. Creating WelcomeCtrl ● cordovaApp.controller('WelcomeCtrl', ● function WelcomeCtrl($scope, $location, PhoneGap) { ● $scope.isAppLoaded = false; ● // to detect if app is loaded ● PhoneGap.ready().then(function() { ● alert("App loaded"); ● $scope.isAppLoaded = true; ● }); ● $scope.gotoLogin = function() { ● $location.url('/login'); ● }; ● } ● );
  • 18. Create Login html ● Create login.html in partials folder. ● <form role="form"> ● <div class="form-group"> ● <label for="exampleInputEmail1">Email address</label> ● <input type="email" ng-model="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email"> ● </div> ● <div class="form-group"> ● <label for="exampleInputPassword1">Password</label> ● <input type="password" ng-model="password" class="form-control" id="exampleInputPassword1" placeholder="Password"> ● </div> ● <button type="submit" ng-click="showVals()" class="btn btndefault">Submit</button> ● </form>
  • 19. Create LoginCtrl ● cordovaApp.controller('LoginCtrl', ● ● function LoginCtrl($scope, $location, PhoneGap) { $scope.showVals = function() { ● ● }; ● } ● ); alert($scope.email + " " + $scope.password);
  • 20. Add Controller Links to index.html
  • 21. Cordova Build ●cordova build android ●cordova emulate android
  • 23. About Neev Web Mobile Magento eCommerce SaaS Applications Video Streaming Portals Rich Internet Apps Custom Development iPhone Android Windows Phone 7 HTML5 Apps Cloud AWS Consulting Partner Rackspace Joyent Heroku Google App Engine Key Company Highlights 250+ team with experience in managing offshore, distributed development. Neev Technologies established in Jan ’05 User Interface Design and User Experience Design VC Funding in 2009 By Basil Partners Performance Consulting Practices Part of Publicis Groupe Quality Assurance & Testing Member of NASSCOM Outsourced Product Development Offices at Bangalore and Pune
  • 26. sales@neevtech.com Neev Information Technologies Pvt. Ltd. India - Bangalore India - Pune The Estate, # 121,6th Floor, #13 L’Square, 3rd Floor Dickenson Road Parihar Chowk, Aundh, Bangalore-560042 Pune – 411007. Phone :+91 80 25594416 Phone : +91-64103338 For more info on our offerings, visit www.neevtech.com