Go to file
Ibrahim Hadeed c018fec497 Merge pull request #73 from dzonatan/master
feat(plugin): add InAppBrowser plugin
2016-03-25 17:40:35 -04:00
demo
ng1demo
scripts style(docs): rearranged the supported platforms section 2016-03-24 14:43:27 -04:00
src Merge pull request #73 from dzonatan/master 2016-03-25 17:40:35 -04:00
test/app
typings/es6-shim
.gitignore
bundle.js
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
DEVELOPER.md
gulpfile.js
package.json chore(): update rxjs 2016-03-17 15:49:15 -05:00
README.md
tsconfig.json

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