3
0
mirror of https://github.com/danielsogl/awesome-cordova-plugins.git synced 2025-04-09 16:43:19 +08:00
Ibby Hadeed 17366a29da feat(): add IonicNativePlugin base class ()
* add base class

* properties are static

* some fixes

* tslint
2017-04-27 00:36:12 -04:00

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
* ```
* 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; }
}