angular.js - How to call Cordova plugin in Ionic2?
某草草
某草草 2017-05-15 17:05:10
0
1
593

How to call the cordova plug-in in ionic2 based on Typescript?
The plug-in is written by myself and cannot use ionic-native.
How to get the instance of the plug-in? For example, the export plug-in is called plugin
. According to some opinions on the Internet:

declear var window: any;

Then call it in the code, such as in the life cycle function ionViewLoaded:

window.plugin.someMethod();

But the plugin instance cannot be obtained. How to call for leave?

某草草
某草草

reply all(1)
为情所困

Click window.cordova in Console to see what is included, and then search step by step. Most likely there is window.cordova.plugin(s)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template