【问题标题】:Make https request in Angularjs在 Angularjs 中发出 https 请求
【发布时间】:2015-07-13 11:53:22
【问题描述】:

在 AngularJS 中,我正在编写以下代码, $http.get(url).then....

正在发送 http 请求,因为我的服务器配置为 https。使用 $http.get 时,我在 firebug 控制台中看到以下内容。

阻止加载混合的活动内容

angularjs 中发出 https 请求的方式是什么。找不到有关此主题的文档。

编辑 我的确切代码是:

$http.get(url).then(function(response) {
                        return response;
                    });

firebug 中显示的请求的 URL 是: 获取http://localhost:8080/content/help/en/photoshop/product-details.js

【问题讨论】:

  • $http.get(url).then.... 你能添加一个url 参数的例子吗?
  • 您要的网址是什么?什么样的反应?
  • 你是如何包含你的脚本的??
  • @Maraboc,我使用了这样的相对路径:
  • 你的css文件是一样的吗??

标签: javascript angularjs


【解决方案1】:

试试这个代码。

删除 http 并以 //localhost:8080/content 开始

Credits

【讨论】:

    猜你喜欢
    • 2023-03-22
    • 2017-06-22
    • 2016-04-29
    • 2023-03-26
    • 2012-12-14
    • 1970-01-01
    • 2011-05-12
    • 2018-07-16
    • 1970-01-01
    相关资源
    最近更新 更多