Go to file
2016-03-24 14:25:04 -04:00
demo BarcodeScanner 2016-02-02 15:35:45 +01:00
ng1demo ng1 magic 2015-12-01 13:33:08 -06:00
scripts explicity using gulp from node_modules 2016-03-15 17:43:59 -05:00
src refactor(batterystatus): update event based methods to use new @Cordova wrapper implementation 2016-03-24 14:25:04 -04: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
CHANGELOG.md chore(changelog): add changelog 2016-03-17 16:29:00 -04:00
circle.yml trying to cache Circle CI's checkout of ionic-site 2016-03-15 17:36:59 -05: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(): update rxjs 2016-03-17 15:49:15 -05:00
README.md Update README.md 2016-03-15 14:12:21 -05:00
tsconfig.json chore(): update tsconfig 2016-03-10 15:51:27 -06:00

Circle CI Commitizen friendly npm

NPM

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

Ibrahim Hadeed - @ihadeed

Tim Lancina - @timlancina

Max Lynch - @maxlynch

Rob Wormald - @robwormald