SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slidesmattysmith
 
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]Dirk Ginader
 
Building a js widget
Building a js widgetBuilding a js widget
Building a js widgetTudor Barbu
 
以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角以Vue開發電子商務網站
架構與眉角
以Vue開發電子商務網站
架構與眉角Mei-yu Chen
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJsTudor Barbu
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTudor Barbu
 
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.0Takuya Tejima
 

Was ist angesagt? (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....
 

Ähnlich wie Phonegap and AngularJS

Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordovaCandice Zhuang
 
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 AngularMovel
 
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 ShindeNSConclave
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
 
Docker session III: Dockerfile
Docker session III: DockerfileDocker session III: Dockerfile
Docker session III: DockerfileDegendra Sivakoti
 
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...Olivier Destrebecq
 
Cloud api之應用與實例
Cloud api之應用與實例Cloud api之應用與實例
Cloud api之應用與實例Simon Su
 
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]Guy Lis
 
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 2013Opersys inc.
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
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 KrausWomen in Technology Poland
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end WorkflowPagepro
 
ДМИТРО БУДИМ «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...GoQA
 
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.0Frost
 
Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013Opersys inc.
 
Extending CMS Made Simple
Extending CMS Made SimpleExtending CMS Made Simple
Extending CMS Made Simplecmsmssjg
 
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 WilliamsPhilip Stehlik
 
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...Igalia
 

Ähnlich wie 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...
 

Mehr von Neev Technologies

Razorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate ProfileRazorfish India (Neev) Corporate Profile
Razorfish India (Neev) Corporate ProfileNeev Technologies
 
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 @ NeevNeev Technologies
 
Hybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in HybrisHybris Hackathon - Split Payments in Hybris
Hybris Hackathon - Split Payments in HybrisNeev Technologies
 
Hybris Hackathon - Data Modeling
Hybris Hackathon - Data ModelingHybris Hackathon - Data Modeling
Hybris Hackathon - Data ModelingNeev Technologies
 
RazorfishNeev Engagement Process
RazorfishNeev Engagement ProcessRazorfishNeev Engagement Process
RazorfishNeev Engagement ProcessNeev 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!
Building A Jewelry e-store - Now, sell your jewelry to the world!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?
How to add Custom Font to your iOS-based App?Neev Technologies
 
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 AppsNeev Technologies
 
Neev Application Performance Management Services
Neev Application Performance Management ServicesNeev Application Performance Management Services
Neev Application Performance Management ServicesNeev Technologies
 
Neev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev Technologies
 
Mobile Responsive Design @ Neev
Mobile Responsive Design @ NeevMobile Responsive Design @ Neev
Mobile Responsive Design @ NeevNeev Technologies
 
Business Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevBusiness Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevNeev Technologies
 
Neev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Technologies
 
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 StoresNeev Technologies
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source ContributionsNeev Technologies
 

Mehr von 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
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

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