mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
Merge branch 'master' of github.com:driftyco/ionic-native
This commit is contained in:
commit
cf531af244
14
README.md
14
README.md
@ -3,7 +3,7 @@
|
||||
|
||||
# Ionic Native
|
||||
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic 2](http://ionicframework.com/) mobile app easy.
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic](https://ionicframework.com/) mobile app easy.
|
||||
|
||||
Ionic Native wraps plugin callbacks in a Promise or Observable, providing a common interface for all plugins and making it easy to use plugins with Angular change detection.
|
||||
|
||||
@ -14,11 +14,11 @@ Run following command to install Ionic Native in your project.
|
||||
npm install @ionic-native/core --save
|
||||
```
|
||||
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](http://ionicframework.com/docs/native/) for complete instructions on how to add and use the plugins.
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](https://ionicframework.com/docs/native/) for complete instructions on how to add and use the plugins.
|
||||
|
||||
## Documentation
|
||||
|
||||
For the full Ionic Native documentation, please visit [http://ionicframework.com/docs/native/](http://ionicframework.com/docs/native/).
|
||||
For the full Ionic Native documentation, please visit [https://ionicframework.com/docs/native/](https://ionicframework.com/docs/native/).
|
||||
|
||||
### Basic Usage
|
||||
|
||||
@ -165,7 +165,7 @@ export class AppModule {}
|
||||
|
||||
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.
|
||||
|
||||
![img](http://ionic-io-assets.s3.amazonaws.com/ionic-native-console.png)
|
||||
![img](https://ionic-io-assets.s3.amazonaws.com/ionic-native-console.png)
|
||||
|
||||
|
||||
## Plugin Missing?
|
||||
@ -177,12 +177,12 @@ For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2
|
||||
|
||||
# Credits
|
||||
|
||||
Ibby Hadeed - [@ihadeed](http://github.com/ihadeed)
|
||||
Ibby Hadeed - [@ihadeed](https://github.com/ihadeed)
|
||||
|
||||
Tim Lancina - [@timlancina](http://twitter.com/timlancina)
|
||||
Tim Lancina - [@timlancina](https://twitter.com/timlancina)
|
||||
|
||||
Mike Hartington - [@mhartington](https://twitter.com/mhartington)
|
||||
|
||||
Max Lynch - [@maxlynch](http://twitter.com/maxlynch)
|
||||
Max Lynch - [@maxlynch](https://twitter.com/maxlynch)
|
||||
|
||||
Rob Wormald - [@robwormald](https://twitter.com/robwormald)
|
||||
|
@ -455,7 +455,7 @@ export class GoogleMap {
|
||||
pluginRef: 'plugin.google.maps.Map',
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps',
|
||||
install: 'ionic plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"',
|
||||
install: 'ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"',
|
||||
installVariables: ['API_KEY_FOR_ANDROID', 'API_KEY_FOR_IOS'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
|
@ -4,7 +4,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface ImagePickerOptions {
|
||||
/**
|
||||
* max images to be selected, defaults to 15. If this is set to 1, upon selection of a single image, the plugin will return it.
|
||||
* max images to be selected, defaults to 15. If this is set to 1, upon selection of a single image, the plugin will return it. (Android only)
|
||||
*/
|
||||
maximumImagesCount?: number;
|
||||
|
||||
|
@ -14,12 +14,12 @@ export interface WheelSelectorOptions {
|
||||
/**
|
||||
* The items to display (array of items).
|
||||
*/
|
||||
items: WheelSelectorItem[];
|
||||
items: Array<Array<WheelSelectorItem>>;
|
||||
|
||||
/**
|
||||
* Which items to display by default, example ["2","Apple"] (if items.length is 2 for instance)
|
||||
*/
|
||||
defaultItems?: WheelSelectorItem[];
|
||||
defaultItems?: Array<WheelSelectorItem>;
|
||||
|
||||
/**
|
||||
* The 'ok' button text
|
||||
@ -44,13 +44,6 @@ export interface WheelSelectorOptions {
|
||||
* Default: false
|
||||
*/
|
||||
wrapWheelText?: boolean;
|
||||
|
||||
/**
|
||||
* The json key to display, by default it is description, this allows for setting any
|
||||
* key/value to be displayed
|
||||
* Default: description
|
||||
*/
|
||||
displayKey?: string;
|
||||
}
|
||||
|
||||
export interface WheelSelectorData {
|
||||
@ -84,12 +77,13 @@ export interface WheelSelectorData {
|
||||
* ],
|
||||
* };
|
||||
*
|
||||
* //use most of the default values
|
||||
* this.selector.show({
|
||||
* title: "Select some Fruit",
|
||||
* items: [
|
||||
* [jsonData.numbers],
|
||||
* [jsonData.fruits]
|
||||
* ],
|
||||
* jsonData.numbers,
|
||||
* jsonData.fruits
|
||||
* ]
|
||||
* }).then(
|
||||
* result => {
|
||||
* console.log('Selected: ' + result[0].description + ' at index: ' + result[0].index
|
||||
@ -98,6 +92,28 @@ export interface WheelSelectorData {
|
||||
* err => console.log('Error occurred while getting result: ', err)
|
||||
* );
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* //set some initial default values to display: "2", "Tangerine"
|
||||
* this.selector.show({
|
||||
* title: "Select some Fruit",
|
||||
* items: [
|
||||
* jsonData.numbers,
|
||||
* jsonData.fruits
|
||||
* ],
|
||||
* defaultItems: [
|
||||
* jsonData.numbers[1],
|
||||
* jsonData.fruits[2]
|
||||
* ]
|
||||
* }).then(
|
||||
* result => {
|
||||
* console.log('Selected: ' + result[0].description + ' at index: ' + result[0].index
|
||||
* + ' and ' + result[1].description + ' at index: ' + result[1].index);
|
||||
* },
|
||||
* err => console.log('Error occurred while getting result: ', err)
|
||||
* );
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
|
Loading…
Reference in New Issue
Block a user