Can you used ng-Cordova with the PhoneGap Build service?

此生再无相见时 提交于 2019-12-24 12:25:07

问题


I am building a hybrid mobile app using the Ionic Framework library (including Angular JS) and have found that they've made a wrapper for a number of the cordova plugins so that they work with Angular.

I have downloaded the ng-cordova.js file and referenced it in my index.html

As as test I have used the cordova device plugin just to display the device name in a popup. It works fine in the ripple emulator just running the html in my browser, however when I build the app using Phonegap Build it no longer works.

Is it not possible to use the ng-cordova.js file to access native device features when using Phonegap Build? (i.e. Can you literally only use the plugins from the list on the build website?)


回答1:


As another user of PhoneGap Build, you are limited to whatever plugins can be found here:

https://build.phonegap.com/plugins

That being said, if the plugin is not in their repository already (most of the popular ones are), you can always submit it yourself or try to get the author to submit it.

Other than that, it should work fine.




回答2:


This is ngCordova contributor. It should be possible to use ngCordova with PhoneGap, but are you using the same plugins repos as they are mentioned in ngCordova documentation?

I can imagine that PhoneGap plugins my have different API than Cordova plugins. And what is here the reason to use PhoneGap Build, if I may ask? Can you specify which plugins are not working and how could I simply replicate your errors?



来源:https://stackoverflow.com/questions/26803479/can-you-used-ng-cordova-with-the-phonegap-build-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!