angularjs - 如何将 Cordova 插件添加到类固醇应用程序

标签 angularjs cordova plugins steroids

我正在使用 cordova-http类固醇应用程序中的插件。根据 manual ,我在 steroids 的 iOS 配置中添加了插件可以服务:

[
  {"source":"https://github.com/wymsee/cordova-HTTP.git"}
]
我还在 config.xml 中添加了它:
<js-module src="www/cordovaHTTP.js" name="cordova-HTTP">
  <clobbers target="cordova-HTTP" />
</js-module>
但我还是得到了error告诉我注入(inject)的 Angular 模型丢失了。
  • 我是否需要将它链接到 index.html 知道手册说<js-module>完成这项工作。
  • 我需要像插件的github中提到的那样安装插件吗
    页:
    Cordova 插件添加https://github.com/wymsee/cordova-HTTP.git
  • 请你告诉我我应该一步一步做些什么来做到这一点
    工作?
  • 最佳答案

    添加插件的方法有很多。有一个简单的方法:

  • 打开你的命令行
  • 路径/到/你的/项目/插件
  • Cordova 插件添加https://github.com/wymsee/cordova-HTTP.git
  • 通过添加“cordovaHTTP”注入(inject)插件
    示例: var app = angular.module('myApp', ['ngRoute', 'ngAnimate', 'cordovaHTTP']);
  • 与关键字 cordovaHTTP
  • 一起使用

    希望它会帮助你

    关于angularjs - 如何将 Cordova 插件添加到类固醇应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28373434/

    相关文章:

    android - jquery忽略错误和成功json代码

    javascript - Ionic/Cordova - 获取要在 <img src =""> 上使用的图像路径

    plugins - Eclipse插件开发: how to add functionality to editor

    android - 有没有办法在 Netbeans 上回滚 Android 插件?

    javascript - Angular 2 ng类取决于功能

    javascript - 如何在 Angular.js 服务中正确包装 GAE Channel API 并将更新推送到整个应用程序?

    javascript - AngularJS:$http.get方法下载pdf文件

    php - 带有正确 header 的预检响应不成功

    Eclipse RCP 插件错误 - 无法解析模块

    javascript - 为什么我的指令不能与 ng-bind-html 指令一起使用?