简体   繁体   English

如何将cordova插件添加到类固醇应用程序

[英]how to add cordova plugin to steroids app

I'm using cordova-http plugin in a Steroids app.我在 Steroids 应用程序中使用cordova-http插件。 according to manual , I've added plugin in iOS config in steroids could service:根据手册,我在 steroids can service 的 iOS 配置中添加了插件:

[
  {"source":"https://github.com/wymsee/cordova-HTTP.git"}
]

and also I've added it in config.xml:我还在 config.xml 中添加了它:

<js-module src="www/cordovaHTTP.js" name="cordova-HTTP">
  <clobbers target="cordova-HTTP" />
</js-module>

but still I got the error telling me injected Angular model is missing.但我仍然收到错误消息,告诉我缺少注入的 Angular 模型。

  1. do I need to link it to index.html knowing that manual says <js-module> fulfills this job.我是否需要将它链接到 index.html 知道手册说<js-module>完成这项工作。

  2. do I need to install plugin like what's mentioned in plugin's github page:我是否需要像插件的 github 页面中提到的那样安装插件:

    cordova plugin add https://github.com/wymsee/cordova-HTTP.git科尔多瓦插件添加https://github.com/wymsee/cordova-HTTP.git

  3. may you please tell me what should I do step by step to make it work?你能告诉我我应该怎么做才能让它工作?

There are many ways to add plugins.添加插件的方法有很多。 There's an easy way:有一个简单的方法:

  1. open your command line打开你的命令行
  2. path/to/your/project/plugins路径/到/您的/项目/插件
  3. cordova plugin add https://github.com/wymsee/cordova-HTTP.git科尔多瓦插件添加https://github.com/wymsee/cordova-HTTP.git
  4. Inject the plugins by adding 'cordovaHTTP' Example: var app = angular.module('myApp', ['ngRoute', 'ngAnimate', 'cordovaHTTP']);通过添加 'cordovaHTTP' 注入插件 示例: var app = angular.module('myApp', ['ngRoute', 'ngAnimate', 'cordovaHTTP']);
  5. Use it with key word cordovaHTTP与关键字cordovaHTTP一起使用

Hopes it'll help you希望能帮到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AppGyver类固醇应用程序-如何将滚动条添加到抽屉中 - AppGyver steroids app - How to add scrolling to a Drawer 如何使用Cordova Geolocation插件在Ionic应用程序中添加标记 - How to add a marker in an Ionic App with the Cordova Geolocation plugin 无法在angularJS上添加cordova插件 - Unable to add cordova plugin on angularJS Cordova-我怎么知道我的应用程序是使用HTML5 Geolocation API还是Cordova Geolocation插件? - Cordova - how do I know if my app is using the HTML5 Geolocation API or the cordova geolocation plugin? 如何在离子+ cordova +角应用中使用cordova-universal-links-plugin? - how to use cordova-universal-links-plugin in a ionic+cordova+angular app? Visual Studio 2015 Apache Cordova应用程序&gt;如何添加业务层? - Visual Studio 2015 Apache Cordova App > how to add business layer? 在angularJS应用程序中使用cordova(phonegap)插件 - using cordova (phonegap) plugin within angularJS app 使用Cordova插件初始化Android In App Billing - Initialization Android In App Billing using cordova plugin 如何在Appgyver类固醇中创建自定义的webview - How to create a customized webview in Appgyver Steroids Angularjs + steroids:$http 不会在应用程序上获取 url,但它可以在浏览器上运行 - Angularjs + steroids: $http won't GET the url on the app but it works on a browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM