SlideShare a Scribd company logo
Cordova development 
with AngularJS 
… and UI component libraries
Me 
● Andreas Argelius 
● From Sweden 
● Living in Japan 
● Loves food and beer
Me 
● Works for Asial Corporation 
● Developer on Onsen UI 
… so I might be slightly biased towards AngularJS and Onsen UI
Cordova 
Hybrid apps using 
web technologies. 
Java 
Objective-C
SPA (Single Page Application) 
The whole app in one HTML file 
● No page reload 
● Manipulate DOM with JavaScript 
● Load content dynamically 
More fluid and “native” feel.
SPA Frameworks
AngularJS 
● Client-side framework 
● Separates DOM manipulation from logic 
● Two-way data binding
AngularJS - features 
Services 
Objects that can be inserted in various places through dependency injection. 
Directives 
Define reusable custom HTML tags, attributes or classes. 
Controllers 
Control application state.
Services 
Substitutable objects that can be used 
throughout your application. 
What can we use services for? 
● Data storage, e.g. database models 
● Calling APIs (both local and external)
Services - example 
var module = angular.module('myServices', []); 
module.factory('$myService', function() { 
return { 
doSomething: function() { 
// Do stuff! 
} 
}; 
});
Dependency injection 
Inject dependencies into controllers, directives 
and services 
var app = angular.module('myApp', ['myServices']); 
app.controller('MyController', function($myService) { 
$myService.doSomething(); 
});
Services - substitutable 
● Services should be substitutable by a service 
with same API. 
● Use promises even if without async calls in 
service. 
If you switch from localStorage to some remote storage the service will be 
substitutable if you used promises for the original version, even if localStorage 
isn’t asynchronous.
Reasons for using services 
● Promotes modular design 
● Data abstraction 
● Consistency 
Don’t repeat yourself!
Services are singleton instances 
Only initialized once (lazily)
Services in Cordova 
Possible usage in Cordova development: 
Angularize native APIs 
Wrap API calls in AngularJS services
Example - GeoLocation 
angular.module('app.services', []). 
factory('$geolocation', function($q) { 
return { 
get: function() { 
var deferred = $q.defer(); 
... 
return deferred.promise; 
} 
}; 
});
Example - GeoLocation 
angular.module('app', ['app.services']). 
controller('PositionController', function($scope, $geolocation) { 
$geolocation.get().then(function(position) { 
$scope.currentPosition = position; 
}, 
function(error) { 
// Handle error. 
}) 
}); 
https://gist.github.com/argelius/2ecf0b7c08f31a11eaff
ngCordova 
● Camera, GeoLocation, Accelerometer, etc. 
● AngularJS services 
● Uses $q promises 
github.com/driftyco/ng-cordova
Example - GeoLocation 
angular.module('app', ['ngCordova']). 
controller('LocationController', function($cordovaGeolocation) { 
$cordovaGeolocation. 
getCurrentPosition(). 
then(function(position) { 
// Do stuff. 
}, ...); 
});
ngTouch 
Touch events and helpers. 
● Attribues: ng-click, ng-swipe-left, ng-swipe- 
right 
● $swipe service, to capture touch events.
ngTouch 
Part of standard library 
<script src=”angular-touch.js”></script> 
<script> 
angular.module('app', ['ngTouch']); 
</script>
ngClick 
<button ng-click=”doSomething()”> 
Click me! 
</button> 
Replaces regular ng-click. Mobile browsers 
introduce a 300ms delay. ngTouch removes delay.
Swipe handlers 
<div 
ng-controller=”CarouselCtrl” 
ng-swipe-left=”next()” 
ng-swipe-right=”prev()”> 
... 
</div>
$swipe service 
Only one method: $swipe.bind() 
$swipe.bind({ 
start: function(e) { 
// listens for 'mousedown' or 'touchstart' 
console.log('You tapped (' + e.x + ',' + e.y + ')'); 
} 
// also 'move', 'end' and 'cancel'. 
}
Directives 
● Attach a behavior or change a DOM element 
● Create custom tags, attributes or classes 
● Allows for cleaner markup 
Using: 
module.directive( 'myDirective' , function($dep1, $dep2) { 
... 
});
Directives - example 
angular.module('app', []) 
.directive('myOwnToolbar', function() { 
return { 
restrict: 'E' 
// Lots of options that control 
// the behavior of the directive. 
}; 
});
Directives - example 
Use it in your markup: 
<my-own-toolbar> 
My very own application! 
</my-own-toolbar>
Memory leaks 
Your directives may leak, 
be careful! 
Be nice to the garbage collector.
Memory leaks 
If an object owns a reference to the DOM element, you must 
remove it when the directive is removed from the DOM. 
scope.$on('$destroy', function() { 
this._element = null; 
}.bind(this)); 
Also remove event listeners!
Memory leaks 
● Mobile devices have less memory than desktop 
computers 
● Hybrid apps may be open for a very long time 
● Even a small memory leak may be disastrous!
Chrome Timeline 
Detect memory leaks. Compare state before and after leaking 
action. 
Number of nodes should be same when returning to original state.
Directives in Cordova 
Nice way to use directives in Cordova: 
● Emulate native UI components to make users 
feel at home. 
● Utilize native APIs directly from the markup.
Native app components 
● Page navigation 
● Tab bar 
● Toolbar 
● List view 
Cordova apps shouldn’t feel like 
web applications!
UI components 
Lots of other frameworks also available: 
http://propertycross.com/
Built on top of Angular 
● Ionic and Onsen use AngularJS to create 
custom tags. 
● Natural to write the app using AngularJS since 
it’s already loaded.
Onsen UI ng-model 
Integrates with AngularJS 
<ons-switch ng-model=”switchState”></ons-switch> 
<p>State is: {{ switchState }}</p>
Onsen UI ng-model 
Works like a checkbox:
Components example 
● Sample Sushifinder app 
● Gets position with $geolocation service we 
created before 
● Asks foursquare API for nearby sushi 
restaurants 
https://github.com/argelius/ionic-sushifinder
Sushifinder - Ionic
Ionic 
<ion-navbar> 
... 
</ion-navbar>
Ionic 
<ion-list> 
<ion-item> 
... 
</ion-item> 
... 
</ion-list>
Ionic 
<ion-tabs> 
<ion-tab 
icon=”icon ion-search” ></ion-tab> 
... 
</ion-tabs>
Onsen UI 
<ons-toolbar> 
... 
</ons-toolbar>
Onsen UI 
<ons-list> 
<ons-list-item modifier= ”chevron”> 
... 
</ons-list-item> 
</ons-list>
Onsen UI 
<ons-tabbar> 
<ons-tabbar-item page= ”find.html” > 
</ons-tabbar-item> 
... 
</ons-tabbar>
Thank you 
for listening!

More Related Content

PDF
Intro to UI-Router/TypeScript
Jamal Sinclair O'Garro
 
PPTX
UI-Router
Loc Nguyen
 
PPTX
AngularJS Best Practices
Narek Mamikonyan
 
PPTX
AngularJS Beginners Workshop
Sathish VJ
 
PDF
AngularJS Basics
Ravi Mone
 
PDF
Angular js vs. Facebook react
Keyup
 
PPTX
Step by Step - AngularJS
Infragistics
 
PPTX
AngularJS intro
dizabl
 
Intro to UI-Router/TypeScript
Jamal Sinclair O'Garro
 
UI-Router
Loc Nguyen
 
AngularJS Best Practices
Narek Mamikonyan
 
AngularJS Beginners Workshop
Sathish VJ
 
AngularJS Basics
Ravi Mone
 
Angular js vs. Facebook react
Keyup
 
Step by Step - AngularJS
Infragistics
 
AngularJS intro
dizabl
 

What's hot (20)

PPTX
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
PPTX
Why angular js Framework
Sakthi Bro
 
PDF
Workshop 16: EmberJS Parte I
Visual Engineering
 
PPT
Coffee@DBG - Exploring Angular JS
Deepu S Nath
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PDF
The Art of AngularJS - DeRailed 2014
Matt Raible
 
PDF
AngularJS Best Practices
Betclic Everest Group Tech Team
 
PPTX
Single Page Applications in SharePoint with Angular
Sparkhound Inc.
 
PPTX
Angular - Beginner
Riccardo Masetti
 
PPT
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
PPTX
Angular js
Dinusha Nandika
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PDF
Angularjs architecture
Michael He
 
PDF
AngularJS best-practices
Henry Tao
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PDF
Workshop 9: BackboneJS y patrones MVC
Visual Engineering
 
PDF
Angularjs - lazy loading techniques
Nir Kaufman
 
PDF
AngularJS Introduction
Carlos Morales
 
PDF
Introduction to AJAX In WordPress
Caldera Labs
 
PDF
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
Why angular js Framework
Sakthi Bro
 
Workshop 16: EmberJS Parte I
Visual Engineering
 
Coffee@DBG - Exploring Angular JS
Deepu S Nath
 
Introduction to Angularjs
Manish Shekhawat
 
The Art of AngularJS - DeRailed 2014
Matt Raible
 
AngularJS Best Practices
Betclic Everest Group Tech Team
 
Single Page Applications in SharePoint with Angular
Sparkhound Inc.
 
Angular - Beginner
Riccardo Masetti
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Angular js
Dinusha Nandika
 
Angular JS - Introduction
Sagar Acharya
 
Angularjs architecture
Michael He
 
AngularJS best-practices
Henry Tao
 
Introduction to AngularJS
Jussi Pohjolainen
 
Workshop 9: BackboneJS y patrones MVC
Visual Engineering
 
Angularjs - lazy loading techniques
Nir Kaufman
 
AngularJS Introduction
Carlos Morales
 
Introduction to AJAX In WordPress
Caldera Labs
 
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
Ad

Viewers also liked (20)

PDF
The 10 Commandments of Electromagnetic Compatibility
Jaymie Murray
 
PDF
Community Manager Appreciation Day 2013
Michael Norton
 
ODP
Things I like, I love and I hate.
nachisoukaina
 
PDF
7 Principles for Engaging Users with Visualization
Benjamin Wiederkehr
 
PPT
Augmented Reality Press Conference - Zlatestranky.cz
Pavel Kotyza
 
PPT
Library%20in%20 Your%20 Pocket Slideshare[1]
guestf4e976
 
PPTX
Week 14 learning objectives
Yap Hooi
 
PPTX
Talent webinar slides 6 25 2015 final
Lora Cecere
 
PPTX
Talent pipeline activation webinar
LinkedIn
 
PDF
ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557
สถาบันวิจัยและพัฒนา มทร.รัตนโกสินทร์
 
PPT
Presentación sobre Derechos Humanos
Joaquin Sanchez
 
PDF
19 plan & section of penstock
Nikhil Jaipurkar
 
PPTX
Chindogu
Susan Lieberman
 
PPS
風險測試
excel2003
 
PDF
CV Ahmed madeeh
Ahmed Madeeh
 
PPT
Galicia - Comenius Project
laborcomenius
 
PDF
5° básico b semana 23 al 27 mayo
Colegio Camilo Henríquez
 
PPTX
AFC Café: Nick geukens
AFC Leuven
 
PPTX
Overview of Using Wordpress for Web Site Design
Amy Goodloe
 
DOCX
Radin Brand Experience_2
Lisa Radin Consulting
 
The 10 Commandments of Electromagnetic Compatibility
Jaymie Murray
 
Community Manager Appreciation Day 2013
Michael Norton
 
Things I like, I love and I hate.
nachisoukaina
 
7 Principles for Engaging Users with Visualization
Benjamin Wiederkehr
 
Augmented Reality Press Conference - Zlatestranky.cz
Pavel Kotyza
 
Library%20in%20 Your%20 Pocket Slideshare[1]
guestf4e976
 
Week 14 learning objectives
Yap Hooi
 
Talent webinar slides 6 25 2015 final
Lora Cecere
 
Talent pipeline activation webinar
LinkedIn
 
ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557
สถาบันวิจัยและพัฒนา มทร.รัตนโกสินทร์
 
Presentación sobre Derechos Humanos
Joaquin Sanchez
 
19 plan & section of penstock
Nikhil Jaipurkar
 
Chindogu
Susan Lieberman
 
風險測試
excel2003
 
CV Ahmed madeeh
Ahmed Madeeh
 
Galicia - Comenius Project
laborcomenius
 
5° básico b semana 23 al 27 mayo
Colegio Camilo Henríquez
 
AFC Café: Nick geukens
AFC Leuven
 
Overview of Using Wordpress for Web Site Design
Amy Goodloe
 
Radin Brand Experience_2
Lisa Radin Consulting
 
Ad

Similar to SF Cordova Meetup (20)

PPTX
Intro to AngularJs
SolTech, Inc.
 
PPTX
Angular js
Behind D Walls
 
PDF
Workshop 13: AngularJS Parte II
Visual Engineering
 
PPTX
Intoduction to Angularjs
Gaurav Agrawal
 
PDF
Introduction of angular js
Tamer Solieman
 
ODP
AngularJs Crash Course
Keith Bloomfield
 
PDF
AngularJS 101
Houssem Yahiaoui
 
PPTX
Mean stack Magics
Aishura Aishu
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PDF
Mini-Training: AngularJS
Betclic Everest Group Tech Team
 
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PDF
AngularJS in practice
Eugene Fidelin
 
PPTX
Angular js slides
Amr Abd El Latief
 
PPTX
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
PPTX
The Basics Angular JS
OrisysIndia
 
PDF
AngularJs
Abdhesh Kumar
 
PDF
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
PPTX
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
PPTX
Angular Javascript Tutorial with command
ssuser42b933
 
Intro to AngularJs
SolTech, Inc.
 
Angular js
Behind D Walls
 
Workshop 13: AngularJS Parte II
Visual Engineering
 
Intoduction to Angularjs
Gaurav Agrawal
 
Introduction of angular js
Tamer Solieman
 
AngularJs Crash Course
Keith Bloomfield
 
AngularJS 101
Houssem Yahiaoui
 
Mean stack Magics
Aishura Aishu
 
Angular workshop - Full Development Guide
Nitin Giri
 
Mini-Training: AngularJS
Betclic Everest Group Tech Team
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
Training On Angular Js
Mahima Radhakrishnan
 
AngularJS in practice
Eugene Fidelin
 
Angular js slides
Amr Abd El Latief
 
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
The Basics Angular JS
OrisysIndia
 
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
Angular Javascript Tutorial with command
ssuser42b933
 

Recently uploaded (20)

PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Immersive experiences: what Pharo users do!
ESUG
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Presentation about variables and constant.pptx
kr2589474
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Immersive experiences: what Pharo users do!
ESUG
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
Presentation about variables and constant.pptx
safalsingh810
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 

SF Cordova Meetup

  • 1. Cordova development with AngularJS … and UI component libraries
  • 2. Me ● Andreas Argelius ● From Sweden ● Living in Japan ● Loves food and beer
  • 3. Me ● Works for Asial Corporation ● Developer on Onsen UI … so I might be slightly biased towards AngularJS and Onsen UI
  • 4. Cordova Hybrid apps using web technologies. Java Objective-C
  • 5. SPA (Single Page Application) The whole app in one HTML file ● No page reload ● Manipulate DOM with JavaScript ● Load content dynamically More fluid and “native” feel.
  • 7. AngularJS ● Client-side framework ● Separates DOM manipulation from logic ● Two-way data binding
  • 8. AngularJS - features Services Objects that can be inserted in various places through dependency injection. Directives Define reusable custom HTML tags, attributes or classes. Controllers Control application state.
  • 9. Services Substitutable objects that can be used throughout your application. What can we use services for? ● Data storage, e.g. database models ● Calling APIs (both local and external)
  • 10. Services - example var module = angular.module('myServices', []); module.factory('$myService', function() { return { doSomething: function() { // Do stuff! } }; });
  • 11. Dependency injection Inject dependencies into controllers, directives and services var app = angular.module('myApp', ['myServices']); app.controller('MyController', function($myService) { $myService.doSomething(); });
  • 12. Services - substitutable ● Services should be substitutable by a service with same API. ● Use promises even if without async calls in service. If you switch from localStorage to some remote storage the service will be substitutable if you used promises for the original version, even if localStorage isn’t asynchronous.
  • 13. Reasons for using services ● Promotes modular design ● Data abstraction ● Consistency Don’t repeat yourself!
  • 14. Services are singleton instances Only initialized once (lazily)
  • 15. Services in Cordova Possible usage in Cordova development: Angularize native APIs Wrap API calls in AngularJS services
  • 16. Example - GeoLocation angular.module('app.services', []). factory('$geolocation', function($q) { return { get: function() { var deferred = $q.defer(); ... return deferred.promise; } }; });
  • 17. Example - GeoLocation angular.module('app', ['app.services']). controller('PositionController', function($scope, $geolocation) { $geolocation.get().then(function(position) { $scope.currentPosition = position; }, function(error) { // Handle error. }) }); https://gist.github.com/argelius/2ecf0b7c08f31a11eaff
  • 18. ngCordova ● Camera, GeoLocation, Accelerometer, etc. ● AngularJS services ● Uses $q promises github.com/driftyco/ng-cordova
  • 19. Example - GeoLocation angular.module('app', ['ngCordova']). controller('LocationController', function($cordovaGeolocation) { $cordovaGeolocation. getCurrentPosition(). then(function(position) { // Do stuff. }, ...); });
  • 20. ngTouch Touch events and helpers. ● Attribues: ng-click, ng-swipe-left, ng-swipe- right ● $swipe service, to capture touch events.
  • 21. ngTouch Part of standard library <script src=”angular-touch.js”></script> <script> angular.module('app', ['ngTouch']); </script>
  • 22. ngClick <button ng-click=”doSomething()”> Click me! </button> Replaces regular ng-click. Mobile browsers introduce a 300ms delay. ngTouch removes delay.
  • 23. Swipe handlers <div ng-controller=”CarouselCtrl” ng-swipe-left=”next()” ng-swipe-right=”prev()”> ... </div>
  • 24. $swipe service Only one method: $swipe.bind() $swipe.bind({ start: function(e) { // listens for 'mousedown' or 'touchstart' console.log('You tapped (' + e.x + ',' + e.y + ')'); } // also 'move', 'end' and 'cancel'. }
  • 25. Directives ● Attach a behavior or change a DOM element ● Create custom tags, attributes or classes ● Allows for cleaner markup Using: module.directive( 'myDirective' , function($dep1, $dep2) { ... });
  • 26. Directives - example angular.module('app', []) .directive('myOwnToolbar', function() { return { restrict: 'E' // Lots of options that control // the behavior of the directive. }; });
  • 27. Directives - example Use it in your markup: <my-own-toolbar> My very own application! </my-own-toolbar>
  • 28. Memory leaks Your directives may leak, be careful! Be nice to the garbage collector.
  • 29. Memory leaks If an object owns a reference to the DOM element, you must remove it when the directive is removed from the DOM. scope.$on('$destroy', function() { this._element = null; }.bind(this)); Also remove event listeners!
  • 30. Memory leaks ● Mobile devices have less memory than desktop computers ● Hybrid apps may be open for a very long time ● Even a small memory leak may be disastrous!
  • 31. Chrome Timeline Detect memory leaks. Compare state before and after leaking action. Number of nodes should be same when returning to original state.
  • 32. Directives in Cordova Nice way to use directives in Cordova: ● Emulate native UI components to make users feel at home. ● Utilize native APIs directly from the markup.
  • 33. Native app components ● Page navigation ● Tab bar ● Toolbar ● List view Cordova apps shouldn’t feel like web applications!
  • 34. UI components Lots of other frameworks also available: http://propertycross.com/
  • 35. Built on top of Angular ● Ionic and Onsen use AngularJS to create custom tags. ● Natural to write the app using AngularJS since it’s already loaded.
  • 36. Onsen UI ng-model Integrates with AngularJS <ons-switch ng-model=”switchState”></ons-switch> <p>State is: {{ switchState }}</p>
  • 37. Onsen UI ng-model Works like a checkbox:
  • 38. Components example ● Sample Sushifinder app ● Gets position with $geolocation service we created before ● Asks foursquare API for nearby sushi restaurants https://github.com/argelius/ionic-sushifinder
  • 40. Ionic <ion-navbar> ... </ion-navbar>
  • 41. Ionic <ion-list> <ion-item> ... </ion-item> ... </ion-list>
  • 42. Ionic <ion-tabs> <ion-tab icon=”icon ion-search” ></ion-tab> ... </ion-tabs>
  • 43. Onsen UI <ons-toolbar> ... </ons-toolbar>
  • 44. Onsen UI <ons-list> <ons-list-item modifier= ”chevron”> ... </ons-list-item> </ons-list>
  • 45. Onsen UI <ons-tabbar> <ons-tabbar-item page= ”find.html” > </ons-tabbar-item> ... </ons-tabbar>
  • 46. Thank you for listening!