Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ihadeed/ionic1-ionic-native-example

Showing usage of Ionic-native library inside an Ionic 1 / Angular 1 app
https://github.com/ihadeed/ionic1-ionic-native-example

Last synced: about 1 month ago
JSON representation

Showing usage of Ionic-native library inside an Ionic 1 / Angular 1 app

Awesome Lists containing this project

README

        

# ionic1-ionic-native-example
Showing usage of Ionic-native library inside an Ionic 1 / Angular 1 app

# Usage
- Copy `ionic.native.min.js` to your www directory (you can copy the non-minified version if you wish)
- Add that bundle file to your index.html (See https://github.com/ihadeed/ionic1-ionic-native-example/blob/master/www/index.html#L21-L22)
- ~~Use the plugins and their functions through the global variable `IonicNative` (See https://github.com/ihadeed/ionic1-ionic-native-example/blob/master/www/js/app.js#L28-L34)~~
- Import the module `ionic.native` in your main `angular.module`
- Inject the plugin you need inside a controller/service by adding `$cordova` as a prefix. For example, the plugin `Statusbar` becomes `$cordovaStatusbar`