Go to file
2016-02-18 11:54:23 -06:00
demo BarcodeScanner 2016-02-02 15:35:45 +01:00
dist chore(file): remove file for now 2016-02-17 15:33:17 -06:00
ng1demo ng1 magic 2015-12-01 13:33:08 -06:00
scripts forcing markdown on return statements. Closes #435 2016-02-16 16:57:33 -06:00
src chore(file): remove file for now 2016-02-17 15:33:17 -06:00
test/app ng1 magic 2015-12-01 13:33:08 -06:00
typings/es6-shim chore(): update rxjs 2016-02-05 15:05:46 -06:00
.gitignore Wrapp 2015-11-24 17:50:20 -06:00
bundle.js ng1 magic 2015-12-01 13:33:08 -06:00
circle.yml updating CI to specify ruby version and upgrading typescript doc parsing engine 2016-01-27 13:07:36 -06:00
gulpfile.js chore(docs): setting up dgeni and circle CI 2016-01-25 16:20:36 -06:00
package.json chore(): fix redundant devDeps entry 2016-02-05 19:21:27 -06:00
README.md docs(): update README 2016-02-18 11:54:23 -06:00
tsconfig.json chore(): update tsconfig 2016-02-05 19:21:54 -06:00

Ionic Native

Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your Ionic, Cordova, or Web View mobile app easy.

Promises and Observables

Ionic Native wraps plugin callbacks in a Promise or Observable, providing a common interface for all plugins and ensuring that native events trigger change detection in Angular 2.

import {Geolocation} from 'ionic-native';

Geolocation.getCurrentPosition().then(pos => { 
  console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
});

let watch = Geolocation.watchPosition();
watch.subscribe(pos => {
  console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
});

// to stop watching
watch.unsubscribe();

Runtime Diagnostics

Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.

Credits

Tim Lancina - @timlancina

Max Lynch - @maxlynch

Rob Wormald - @robwormald