SlideShare a Scribd company logo
Tutorial
Develop Mobile Applications with AngularJS
Philipp Burgmer
Software Engineer / Consultant / Trainer
Focus: Frontend, Web Technologies
WeigleWilczek GmbH
burgmer@w11k.com
ABOUT ME
WeigleWilczek / W11k
Software Design, Development & Maintenance
Consulting, Trainings & Project Kickoff
Web Applications with AngularJS
Native Rich Clients with Eclipse RCP
ABOUT US
Developing Mobile Applications
Native Look & Feel
Web-Technologies (HTML, JavaScript, CSS)
Setup
Architecture
Development
APIs
WHAT IT'S ALL ABOUT
SETUP
Installed and in Path:
Node.JS - node - brew install node
Node Package Manager - npm
Git - git - brew install git
Ruby - ruby
Compass - compass - [sudo] gem install compass
Optional:
Android SDK
developer.android.com/sdk (http://developer.android.com/sdk/index.html) or brew install android
Launch Android SDK Manager ( android or Help (http://developer.android.com/tools/help/sdk-manager.html))
Install Following Packages:
Xcode and iOS 7 Simulator on MacOS
Apache Cordova - [sudo] npm install -g cordova
Ionic - [sudo] npm install -g ionic
Optional:
Ripple Emulator - [sudo] npm install -g ripple-emulator
iOS Sim - [sudo] npm install -g ios-sim
ARCHITECTURE
Mobile OS
WebView
Ionic
AngularJS
Cordova
Application
THE BIG PICTURE
Better Known as PhoneGap (http://phonegap.com/)
Nitobi  Adobe  Apache
Native Wrapper for Web-App
Mixing Native- and Web-Code
Plugins for Feature Access
cordova.apache.org (http://cordova.apache.org/)
Current Version: 3.4.1
License: Apache 2.0
229 Plugins
Native  JavaScript
org.apache.cordova
Camera
Battery Status
Console
Contacts
Device Information + Motion + Orientation
Dialogs
File + File Transfer
CORDOVA PLUGINS
Distributioin of Cordova
Services like PhoneGap Build
phonegap.com (http://phonegap.com/)
Developed by Adobe
License: Apache 2.0
HTML enhanced for web apps!
angularjs.org
JavaScript-Framework for Rich Browser Applications
Brings Core UI Concepts like MVC to Browser
Extends HTML instead of abstract it
Lets You Extend HTML to Your Needs (Directives)
angularjs.org (https://angularjs.org/)
Current Version: 1.2.16
License: MIT
by
Frontend-Framework
CSS Optimized for Mobile App
AngularJS Directives and Services
Touch Support
Navigation
Menus & Dialogs
Cordova Plugin(s)
ionicframework.com (http://ionicframework.com/)
Current Version: 1.0.0-beta.6
License: MIT
Similar to Ionic
Frontend-Framework
Cordova and AngularJS based
Directives and Services
onsenui.io (http://onsenui.io/)
Current Version 1.0.4
License: Apache 2.0
OUR FIRST APP
Create and Navigate to an Empty Folder
Run ionic start myFirstApp tabs to Create a New Ionic Application
Navigate to Project Folder cd myFirstApp
Run ionic serve (Ignore Error on Console)
Browser to http://localhost:8100 (http://localhost:8100)
Play around with the App!
Kill Dev-Server in Console with CTRL+C
Do the Same Again with ionic start mySecondApp sidemenu
HANDSON
PROJECT STRUCTURE
Cordova
hooks
merges
platforms
plugins
www
config.xml
Ionic
ionic.project
Custom
scss
bower.json
Gulpfile.js
package.json
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.starter" version="0.0.1" xmlns="http://www.w3.org/ns/w
idgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
An Ionic Framework and Cordova project.
</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">
Ionic Framework Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<!-- Don't store local date in an iCloud backup. Turn this to "cloud" to enable s
torage
to be sent to iCloud. Note: enabling this could result in Apple rejecting yo
ur app.
-->
<preference name="BackupWebStorage" value="none" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
</widget>
CONFIG.XML
TOOLS
Required to Configure and Build Cordova Project
Run cordova to See All Available Commands
Commands to Configure Project
Commands to Build Project
CORDOVA CLI
Ionic Consists of Two Things:
Framework (also Available via Bower)
Command Line Interface (via NPM)
CLI Not Required to Develop Ionic App
Different Versioning
Run ionic to See All Available Commands
Shortcuts to Cordova CLI
create and serve
login and upload
IONIC CLI
Node Package, Installed via npm install -g ripple-emulator
Emulates Android Device in Browser
Requires Android as Platform
Start Server and Open Browser: ripple emulate
RIPPLE EMULATOR
Android
Android SDK Required
cordova platform add android or ionic platform android
cordova emulate android or ionic emulate android
Take a Nap or Drink Some Coffee ...
iOS
Xcode, iOS Simulator and ios-sim Required
cordova platform add ios or ionic platform ios
cordova emulate ios or ionic emulate ios
PLATFORM SIMULATORS
Create a New Cordova Project (not Ionic)
Compare Project Structure to Ionic Project (config.xml)
Delete Cordova Project
Add Android Platform to Ionic Project via ionic
Remove Android Platform via cordova
Add Android Platform Again via cordova
Run ionic serve , Open App in Browser and Check Console for JS Errors
Run Ripple Emulator and Check Console for JS Errors
Run cordova serve , Open App in Browser and Check Console for JS Errors
HANDSON
APIS
API Documentation: docs.angularjs.org/api (https://docs.angularjs.org/api)
Pay Attention: Documentation for latest Build (Select Box at The Top Left Corner)
Basic Tutorial: docs.angularjs.org/tutorial (https://docs.angularjs.org/tutorial)
Great Tutorial Videos: egghead.io (https://egghead.io/)
ANGULARJS
API Doc and Guides at ionicframework.com/docs (http://ionicframework.com/docs/)
Lot of Live Demos and Code Examples
All Directive Starts with Prefix ion (Nice!)
All Services Uses $ionic Prefix (Bad Practice?)
Uses Angular-UI Router
IONIC
OPTIMISATION
Avoid Overlapping Elements (Popups, Overlays)
Try to Keep the DOM Small, Create Multiple Small States
HTML Tables Are Sluggish
Transport Really Needed Data Only
Use Caching
Minimize Code
Test Performance on Real and Old Devices
PERFORMANCE HINTS
Subfolders in hooks
Something Executable (with Hash-Bang)
See README (https://github.com/apache/cordova-lib/blob/master/cordova-lib/templates/hooks-README.md) for a List Of Available Hooks
Can Be Used to Build Frontend (Modify www Content)
Pay Attention: No www Folder  No Valid Cordova Project!
HOOKS
Helps to Structure Code
Dev-Mode with Server, Proxy and LiveReload
SASS 3.2 and LESS 1.5 support
Spec and End-2-End Test
Mock Data for Tests and Dev-Mode
Running Bower to Install and Update Frontend Dependencies
Project- and Per-Developer Configuration as well as Command Line Arguments
Building Distribution with
Annotating AngularJS Dependencies (Transform to Array-Notation)
Code Minimization
Running End-2-End Tests Against Build Application
FABS
FABULOUS ANGULARJS BUILD SYSTEM
Clone GitHub Repo pburgmer/et-ka-2014-ionic-tutorial-app (https://github.com/pburgmer/et-ka-2014-ionic-tutorial-app)
to Get an Ionic App with fabs as Build-System
Run npm install in Project Folder
Create before_prepare Hook
Run Grunt Build: grunt clean prepare compile
Create a Symlink (if not exists) from build-output/compiled to www
or Clean www and Copy Content from build-output/compiled to It
Add Android as Platform
Run cordova prepare
Take a Look at platform/android/www to Ensure Minified Version Is Used
HANDSON
Philipp Burgmer
burgmer@w11k.com
www.w11k.com (http://www.w11k.com)
www.thecodecampus.de (http://www.thecodecampus.de)
Tutorial: Develop Mobile Applications with AngularJS

More Related Content

What's hot (20)

PDF
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 
PDF
20160905 - BrisJS - nightwatch testing
Vladimir Roudakov
 
PDF
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
PDF
Front-end Automated Testing
Ruben Teijeiro
 
PDF
125 고성능 web view-deview 2013 발표 자료_공유용
NAVER D2
 
PDF
Node.js and Selenium Webdriver, a journey from the Java side
Mek Srunyu Stittri
 
PDF
Testing nightwatch, by David Torroija
David Torroija
 
PPTX
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
PDF
Fullstack End-to-end test automation with Node.js, one year later
Mek Srunyu Stittri
 
PDF
Isomorphic web application
Oliver N
 
PDF
Real World AngularJS recipes: beyond TodoMVC
Carlo Bonamico
 
PDF
jQuery Chicago 2014 - Next-generation JavaScript Testing
Vlad Filippov
 
PDF
Building Isomorphic Apps (JSConf.Asia 2014)
Spike Brehm
 
ODP
Passo a Passo para criar uma aplicação Móvel Híbrida
Juliano Martins
 
PDF
Isomorphic JavaScript: #DevBeat Master Class
Spike Brehm
 
PPTX
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
ZIP
Automated Frontend Testing
Neil Crosby
 
PDF
Isomorphic JavaScript with Nashorn
Maxime Najim
 
PDF
Story about module management with angular.js
David Amend
 
PPTX
High Performance Snippets
Steve Souders
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 
20160905 - BrisJS - nightwatch testing
Vladimir Roudakov
 
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
Front-end Automated Testing
Ruben Teijeiro
 
125 고성능 web view-deview 2013 발표 자료_공유용
NAVER D2
 
Node.js and Selenium Webdriver, a journey from the Java side
Mek Srunyu Stittri
 
Testing nightwatch, by David Torroija
David Torroija
 
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
Fullstack End-to-end test automation with Node.js, one year later
Mek Srunyu Stittri
 
Isomorphic web application
Oliver N
 
Real World AngularJS recipes: beyond TodoMVC
Carlo Bonamico
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
Vlad Filippov
 
Building Isomorphic Apps (JSConf.Asia 2014)
Spike Brehm
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Juliano Martins
 
Isomorphic JavaScript: #DevBeat Master Class
Spike Brehm
 
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
Automated Frontend Testing
Neil Crosby
 
Isomorphic JavaScript with Nashorn
Maxime Najim
 
Story about module management with angular.js
David Amend
 
High Performance Snippets
Steve Souders
 

Similar to Tutorial: Develop Mobile Applications with AngularJS (20)

PPTX
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
PDF
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
PDF
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles
 
PPTX
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
PDF
Developing ionic apps for android and ios
gautham_m79
 
PDF
ITB2015 - Crash Course in Ionic + AngularJS
Ortus Solutions, Corp
 
PPTX
Pemrograman mobile menggunakan ionic framework
Puguh Rismadi
 
PPTX
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
PDF
[2015/2016] Apache Cordova
Ivano Malavolta
 
PDF
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles
 
PPTX
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Ermias Bayu
 
PDF
Intro to mobile apps with the ionic framework & angular js
Hector Iribarne
 
PDF
Building Cross-Platform Mobile Apps
Troy Miles
 
PPTX
Building an Ionic hybrid mobile app with TypeScript
Serge van den Oever
 
PDF
Ionic Hybrid Mobile Application
Al Sayed Gamal
 
PDF
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Demian Borba
 
PPTX
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
PDF
Mobile app development with Ionic cross platform apps with Ionic Angular and ...
sestayobstk2
 
PDF
Cordova + Ionic + MobileFirst
Raymond Camden
 
PDF
Mobile Development with PhoneGap
Joshua Johnson
 
Angularjs Tutorial for Beginners
rajkamaltibacademy
 
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles
 
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
Developing ionic apps for android and ios
gautham_m79
 
ITB2015 - Crash Course in Ionic + AngularJS
Ortus Solutions, Corp
 
Pemrograman mobile menggunakan ionic framework
Puguh Rismadi
 
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
[2015/2016] Apache Cordova
Ivano Malavolta
 
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Ermias Bayu
 
Intro to mobile apps with the ionic framework & angular js
Hector Iribarne
 
Building Cross-Platform Mobile Apps
Troy Miles
 
Building an Ionic hybrid mobile app with TypeScript
Serge van den Oever
 
Ionic Hybrid Mobile Application
Al Sayed Gamal
 
Creating mobile apps with Cordova for iOS, Android and BlackBerry 10
Demian Borba
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
Mobile app development with Ionic cross platform apps with Ionic Angular and ...
sestayobstk2
 
Cordova + Ionic + MobileFirst
Raymond Camden
 
Mobile Development with PhoneGap
Joshua Johnson
 
Ad

More from Philipp Burgmer (8)

PDF
Sicherheit in Single-Page-Web-Anwendungen
Philipp Burgmer
 
PDF
EnterJS 2015 - JavaScript von Morgen schon heute
Philipp Burgmer
 
PDF
Taugt AngularJS wirklich was? Erfahrungsbericht und Ausblick
Philipp Burgmer
 
PDF
Legacy WebApps mit AngularJS pimpen
Philipp Burgmer
 
PDF
WJAX 2012 - Web Apps With AngularJS
Philipp Burgmer
 
PDF
JavaMagazin - AngularJS
Philipp Burgmer
 
PDF
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Philipp Burgmer
 
PDF
Web Applications with AngularJS
Philipp Burgmer
 
Sicherheit in Single-Page-Web-Anwendungen
Philipp Burgmer
 
EnterJS 2015 - JavaScript von Morgen schon heute
Philipp Burgmer
 
Taugt AngularJS wirklich was? Erfahrungsbericht und Ausblick
Philipp Burgmer
 
Legacy WebApps mit AngularJS pimpen
Philipp Burgmer
 
WJAX 2012 - Web Apps With AngularJS
Philipp Burgmer
 
JavaMagazin - AngularJS
Philipp Burgmer
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Philipp Burgmer
 
Web Applications with AngularJS
Philipp Burgmer
 
Ad

Recently uploaded (20)

PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PPTX
Lecture 5 - Agentic AI and model context protocol.pptx
Dr. LAM Yat-fai (林日辉)
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
DOCX
TLE9 COOKERY DLL WEEK3 technology and li
jamierha cabaero
 
PDF
Trading Volume Explained by CIFDAQ- Secret Of Market Trends
CIFDAQ
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
ShapeBlue
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
Rethinking Security Operations - Modern SOC.pdf
Haris Chughtai
 
Machine Learning Benefits Across Industries
SynapseIndia
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Lecture 5 - Agentic AI and model context protocol.pptx
Dr. LAM Yat-fai (林日辉)
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
TLE9 COOKERY DLL WEEK3 technology and li
jamierha cabaero
 
Trading Volume Explained by CIFDAQ- Secret Of Market Trends
CIFDAQ
 

Tutorial: Develop Mobile Applications with AngularJS

  • 2. Philipp Burgmer Software Engineer / Consultant / Trainer Focus: Frontend, Web Technologies WeigleWilczek GmbH [email protected] ABOUT ME
  • 3. WeigleWilczek / W11k Software Design, Development & Maintenance Consulting, Trainings & Project Kickoff Web Applications with AngularJS Native Rich Clients with Eclipse RCP ABOUT US
  • 4. Developing Mobile Applications Native Look & Feel Web-Technologies (HTML, JavaScript, CSS) Setup Architecture Development APIs WHAT IT'S ALL ABOUT
  • 6. Installed and in Path: Node.JS - node - brew install node Node Package Manager - npm Git - git - brew install git Ruby - ruby Compass - compass - [sudo] gem install compass
  • 7. Optional: Android SDK developer.android.com/sdk (http://developer.android.com/sdk/index.html) or brew install android Launch Android SDK Manager ( android or Help (http://developer.android.com/tools/help/sdk-manager.html)) Install Following Packages: Xcode and iOS 7 Simulator on MacOS
  • 8. Apache Cordova - [sudo] npm install -g cordova Ionic - [sudo] npm install -g ionic Optional: Ripple Emulator - [sudo] npm install -g ripple-emulator iOS Sim - [sudo] npm install -g ios-sim
  • 11. Better Known as PhoneGap (http://phonegap.com/) Nitobi  Adobe  Apache Native Wrapper for Web-App Mixing Native- and Web-Code Plugins for Feature Access cordova.apache.org (http://cordova.apache.org/) Current Version: 3.4.1 License: Apache 2.0
  • 12. 229 Plugins Native  JavaScript org.apache.cordova Camera Battery Status Console Contacts Device Information + Motion + Orientation Dialogs File + File Transfer CORDOVA PLUGINS
  • 13. Distributioin of Cordova Services like PhoneGap Build phonegap.com (http://phonegap.com/) Developed by Adobe License: Apache 2.0
  • 14. HTML enhanced for web apps! angularjs.org JavaScript-Framework for Rich Browser Applications Brings Core UI Concepts like MVC to Browser Extends HTML instead of abstract it Lets You Extend HTML to Your Needs (Directives) angularjs.org (https://angularjs.org/) Current Version: 1.2.16 License: MIT by
  • 15. Frontend-Framework CSS Optimized for Mobile App AngularJS Directives and Services Touch Support Navigation Menus & Dialogs Cordova Plugin(s) ionicframework.com (http://ionicframework.com/) Current Version: 1.0.0-beta.6 License: MIT
  • 16. Similar to Ionic Frontend-Framework Cordova and AngularJS based Directives and Services onsenui.io (http://onsenui.io/) Current Version 1.0.4 License: Apache 2.0
  • 18. Create and Navigate to an Empty Folder Run ionic start myFirstApp tabs to Create a New Ionic Application Navigate to Project Folder cd myFirstApp Run ionic serve (Ignore Error on Console) Browser to http://localhost:8100 (http://localhost:8100) Play around with the App! Kill Dev-Server in Console with CTRL+C Do the Same Again with ionic start mySecondApp sidemenu HANDSON
  • 20. <?xml version='1.0' encoding='utf-8'?> <widget id="com.ionicframework.starter" version="0.0.1" xmlns="http://www.w3.org/ns/w idgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>HelloCordova</name> <description> An Ionic Framework and Cordova project. </description> <author email="hi@ionicframework" href="http://ionicframework.com/"> Ionic Framework Team </author> <content src="index.html" /> <access origin="*" /> <preference name="fullscreen" value="true" /> <preference name="webviewbounce" value="false" /> <preference name="UIWebViewBounce" value="false" /> <preference name="DisallowOverscroll" value="true" /> <!-- Don't store local date in an iCloud backup. Turn this to "cloud" to enable s torage to be sent to iCloud. Note: enabling this could result in Apple rejecting yo ur app. --> <preference name="BackupWebStorage" value="none" /> <feature name="StatusBar"> <param name="ios-package" value="CDVStatusBar" onload="true" /> </feature> </widget> CONFIG.XML
  • 21. TOOLS
  • 22. Required to Configure and Build Cordova Project Run cordova to See All Available Commands Commands to Configure Project Commands to Build Project CORDOVA CLI
  • 23. Ionic Consists of Two Things: Framework (also Available via Bower) Command Line Interface (via NPM) CLI Not Required to Develop Ionic App Different Versioning Run ionic to See All Available Commands Shortcuts to Cordova CLI create and serve login and upload IONIC CLI
  • 24. Node Package, Installed via npm install -g ripple-emulator Emulates Android Device in Browser Requires Android as Platform Start Server and Open Browser: ripple emulate RIPPLE EMULATOR
  • 25. Android Android SDK Required cordova platform add android or ionic platform android cordova emulate android or ionic emulate android Take a Nap or Drink Some Coffee ... iOS Xcode, iOS Simulator and ios-sim Required cordova platform add ios or ionic platform ios cordova emulate ios or ionic emulate ios PLATFORM SIMULATORS
  • 26. Create a New Cordova Project (not Ionic) Compare Project Structure to Ionic Project (config.xml) Delete Cordova Project Add Android Platform to Ionic Project via ionic Remove Android Platform via cordova Add Android Platform Again via cordova Run ionic serve , Open App in Browser and Check Console for JS Errors Run Ripple Emulator and Check Console for JS Errors Run cordova serve , Open App in Browser and Check Console for JS Errors HANDSON
  • 27. APIS
  • 28. API Documentation: docs.angularjs.org/api (https://docs.angularjs.org/api) Pay Attention: Documentation for latest Build (Select Box at The Top Left Corner) Basic Tutorial: docs.angularjs.org/tutorial (https://docs.angularjs.org/tutorial) Great Tutorial Videos: egghead.io (https://egghead.io/) ANGULARJS
  • 29. API Doc and Guides at ionicframework.com/docs (http://ionicframework.com/docs/) Lot of Live Demos and Code Examples All Directive Starts with Prefix ion (Nice!) All Services Uses $ionic Prefix (Bad Practice?) Uses Angular-UI Router IONIC
  • 31. Avoid Overlapping Elements (Popups, Overlays) Try to Keep the DOM Small, Create Multiple Small States HTML Tables Are Sluggish Transport Really Needed Data Only Use Caching Minimize Code Test Performance on Real and Old Devices PERFORMANCE HINTS
  • 32. Subfolders in hooks Something Executable (with Hash-Bang) See README (https://github.com/apache/cordova-lib/blob/master/cordova-lib/templates/hooks-README.md) for a List Of Available Hooks Can Be Used to Build Frontend (Modify www Content) Pay Attention: No www Folder  No Valid Cordova Project! HOOKS
  • 33. Helps to Structure Code Dev-Mode with Server, Proxy and LiveReload SASS 3.2 and LESS 1.5 support Spec and End-2-End Test Mock Data for Tests and Dev-Mode Running Bower to Install and Update Frontend Dependencies Project- and Per-Developer Configuration as well as Command Line Arguments Building Distribution with Annotating AngularJS Dependencies (Transform to Array-Notation) Code Minimization Running End-2-End Tests Against Build Application FABS FABULOUS ANGULARJS BUILD SYSTEM
  • 34. Clone GitHub Repo pburgmer/et-ka-2014-ionic-tutorial-app (https://github.com/pburgmer/et-ka-2014-ionic-tutorial-app) to Get an Ionic App with fabs as Build-System Run npm install in Project Folder Create before_prepare Hook Run Grunt Build: grunt clean prepare compile Create a Symlink (if not exists) from build-output/compiled to www or Clean www and Copy Content from build-output/compiled to It Add Android as Platform Run cordova prepare Take a Look at platform/android/www to Ensure Minified Version Is Used HANDSON