mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
feat(plugin): proxy plugin properties
Rename RequiresPlugin decorator to CordovaProperty and replace getter so we can forward property access to the underlying plugin property.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
||||
|
||||
declare var window;
|
||||
|
||||
/**
|
||||
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
|
||||
@@ -43,8 +45,10 @@ export class AppRate {
|
||||
* customLocale {Object} null - custom locale object
|
||||
* @type {{}}
|
||||
*/
|
||||
@Cordova()
|
||||
static preferences = {};
|
||||
@CordovaProperty
|
||||
static get preferences(){
|
||||
return window.AppRate.preferences;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompts the user for rating
|
||||
|
||||
Reference in New Issue
Block a user