我正在使用github上的cordova插件,不适用于离子原生。在离子2中使用非离子原生插件2
我有问题。如何在离子2中使用非离子原生插件?
我尝试:
declare var myPlugin: any;
myPlugin.doSomething(...)
和其他论坛的解决方案
但我有错误:
ReferenceError: myPlugin is not defined
at new HomePage (http://localhost:8100/build/main.js:18762:9)
我的配置:
Ionic Framework: ^2.0.0-rc.3
Ionic Native: ^2.2.3
Ionic App Scripts: 1.0.0
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.9.5
OS Platform: Windows 10
Navigator Platform: Win32
cordova 6.5.0
同样的问题: Working with non ionic-native plugins in Ionic 2
你可以添加一个链接到你正在尝试使用的插件吗? 正如您提供的链接中所建议的那样,您是否尝试登录'cordova'来查看插件是否在那里? –
你正在尝试在一个设备或离子发球? –
在离子发射,测试初始化功能。我会尝试设备。 – ghot