请问如何在基于Typescript的ionic2中调用cordova插件呢?插件是自己写的,不能使用ionic-native。如何获取插件的实例呢?比如导出插件叫plugin根据网上一些说法先:
declear var window: any;
然后在代码中调用,比如在生命周期函数ionViewLoaded中:
window.plugin.someMethod();
但是无法获取到pluigin实例,请假如何调用?
Click window.cordova in Console to see what is included, and then search step by step. Most likely there is window.cordova.plugin(s)
Click window.cordova in Console to see what is included, and then search step by step. Most likely there is window.cordova.plugin(s)