SlideShare una empresa de Scribd logo
1 de 26
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (10)

webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
 
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]
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widget
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJs
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
How to Build SPA with Vue Router 2.0
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
 
So you want to Develop on Android....
So you want to Develop on Android....So you want to Develop on Android....
So you want to Develop on Android....
 

Similar a Phonegap and AngularJS

Cloud api之應用與實例
Cloud api之應用與實例Cloud api之應用與實例
Cloud api之應用與實例
Simon Su
 
Working with the AOSP - Linaro Connect Asia 2013
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.
 

Similar a Phonegap and AngularJS (20)

Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordova
 
Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordova
 
Cross-Platform Mobile Development with Ionic Framework and Angular
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
 
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde
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
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
Angular JS Basics.
Angular JS Basics.Angular JS Basics.
Angular JS Basics.
 
Docker session III: Dockerfile
Docker session III: DockerfileDocker session III: Dockerfile
Docker session III: Dockerfile
 
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...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
 
Cloud api之應用與實例
Cloud api之應用與實例Cloud api之應用與實例
Cloud api之應用與實例
 
Hacking pokemon go [droidcon tel aviv 2016]
Hacking pokemon go [droidcon tel aviv 2016]Hacking pokemon go [droidcon tel aviv 2016]
Hacking pokemon go [droidcon tel aviv 2016]
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
ДМИТРО БУДИМ «Mobile Automation Infrastructure from scratch» Online QADay 202...
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
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
 
Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013
 
Extending CMS Made Simple
Extending CMS Made SimpleExtending CMS Made Simple
Extending CMS Made Simple
 
SF Grails - Ratpack - Compact Groovy Webapps - James Williams
SF Grails - Ratpack - Compact Groovy Webapps - James WilliamsSF Grails - Ratpack - Compact Groovy Webapps - James Williams
SF Grails - Ratpack - Compact Groovy Webapps - James Williams
 
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...
Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 1...
 

Más de Neev Technologies

Hybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in HybrisHybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in Hybris
Neev Technologies
 

Más de Neev Technologies (20)

Razorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate ProfileRazorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate Profile
 
Adobe Experience Manager (Adobe CQ) Capabilities and Experience @ Neev
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
 
Hybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in HybrisHybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in Hybris
 
Hybris Hackathon - Data Modeling
Hybris Hackathon - Data ModelingHybris Hackathon - Data Modeling
Hybris Hackathon - Data Modeling
 
RazorfishNeev Engagement Process
RazorfishNeev Engagement ProcessRazorfishNeev Engagement Process
RazorfishNeev Engagement Process
 
Gameathon @ Neev
Gameathon @ NeevGameathon @ Neev
Gameathon @ Neev
 
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!
Building A Jewelry e-store - Now, sell your jewelry to the world!
 
Neev Load Testing Services
Neev Load Testing ServicesNeev Load Testing Services
Neev Load Testing Services
 
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?
How to add Custom Font to your iOS-based App?
 
Our Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with AppsOur Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with Apps
 
Neev Application Performance Management Services
Neev Application Performance Management ServicesNeev Application Performance Management Services
Neev Application Performance Management Services
 
Drupal Capabilities @ Neev
Drupal Capabilities @ NeevDrupal Capabilities @ Neev
Drupal Capabilities @ Neev
 
Neev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev CakePHP Managed Services Offerings
Neev CakePHP Managed Services Offerings
 
Neev AngularJS Capabilities
Neev AngularJS CapabilitiesNeev AngularJS Capabilities
Neev AngularJS Capabilities
 
Mobile Responsive Design @ Neev
Mobile Responsive Design @ NeevMobile Responsive Design @ Neev
Mobile Responsive Design @ Neev
 
Business Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevBusiness Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ Neev
 
Neev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Conversion Strategy Capabilities
Neev Conversion Strategy Capabilities
 
RazorfishNeev - An Overview
RazorfishNeev - An OverviewRazorfishNeev - An Overview
RazorfishNeev - An Overview
 
A Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry StoresA Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry Stores
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source Contributions
 

Último

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

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