mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-14 04:05:23 +08:00
![Daniel Sogl](/assets/img/avatar_default.png)
* typo(barcode-scanner): fixe circle lint error * typo(docs): Unified the documentations In some plugins the typescript markup was missing. I also unified the console.log string from console.log("hello") to console.log('Hello') so any plugin page look the same.
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|
import { Injectable } from '@angular/core';
|
|
|
|
|
|
/**
|
|
* @name Couchbase Lite
|
|
* @description
|
|
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
|
|
*
|
|
* @usage
|
|
* ```typescript
|
|
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
|
|
*
|
|
* constructor(private couchbase: CouchbaseLite) {
|
|
*
|
|
* couchbase.getURL()
|
|
* .then(url => console.log(url))
|
|
* .catch(error => console.error(error));
|
|
*
|
|
* }
|
|
*
|
|
* ```
|
|
*/
|
|
@Plugin({
|
|
pluginName: 'CouchbaseLite',
|
|
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
|
|
pluginRef: 'cblite',
|
|
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
|
|
platforms: ['Android', 'iOS']
|
|
})
|
|
@Injectable()
|
|
export class CouchbaseLite extends IonicNativePlugin {
|
|
|
|
/**
|
|
* Get the database url
|
|
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
|
*/
|
|
@Cordova({
|
|
callbackStyle: 'node'
|
|
})
|
|
getURL(): Promise<any> { return; }
|
|
|
|
}
|