Go to file
2016-03-10 19:33:43 -06:00
demo BarcodeScanner 2016-02-02 15:35:45 +01:00
ng1demo ng1 magic 2015-12-01 13:33:08 -06:00
scripts chore(): fix 'improve this doc' link 2016-03-04 10:27:01 -06:00
src Update imagepicker.ts 2016-03-10 15:59:14 -08: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 chore(): don't track dist 2016-03-04 12:24:00 -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
CONTRIBUTING.md docs(): add developer docs 2016-02-18 11:55:47 -06:00
DEVELOPER.md Update DEVELOPER.md 2016-03-10 19:33:43 -06:00
gulpfile.js chore(docs): setting up dgeni and circle CI 2016-01-25 16:20:36 -06:00
package.json chore(package): bump to 1.0.12 2016-03-06 08:38:19 -06:00
README.md Update README.md 2016-02-26 11:31:21 -06:00
tsconfig.json chore(): update tsconfig 2016-03-10 15:51:27 -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.

Installation

Run following commmand to install ionic-native in your project.

npm install ionic-native --save

Plugin Missing?

Let us know or submit a PR! Take a look at the Developer Guide for more on how to contribute. ❤️

Credits

Tim Lancina - @timlancina

Max Lynch - @maxlynch

Rob Wormald - @robwormald