腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
0
回答
在
Angular
中
作为
服务
的
Http
调用
javascript
、
angular
、
http
我是一个全新
的
角度,我试图提出一个简单
的
http
请求数据。如何在我
的
组件
中
访问这些数据?我收到错误消息'Cannot read property 'get‘of undefined’import { Injectable } from '@
angular
/core' import { HttpClient } from '@
angular
/common/<e
浏览 0
提问于2017-11-25
得票数 1
3
回答
“从源开始
的
http
://localhost:8888/mydomain/path‘”
http
://localhost:4200’已被CORS策略阻止:不存在“访问控制-允许-原产地”。
java
、
angular
、
spring-boot
、
cors
托管在上
的
角度web应用程序为我
的
spring引导java后端发出请求,如下所述:const headers = new HttpHeaders();
在
因特网上搜索,我找到了一个设置来解决java/spring引导后端
中
的
cors原点问题。) throws Exception { .an
浏览 13
提问于2022-08-25
得票数 2
回答已采纳
2
回答
this.
http
.get不是一个函数
angular
8
javascript
、
angular
我想显示使用
服务
使用角8
的
用户列表。import { HttpClientModule } from '@
angular
/common/
http
';import { NgModule } from '@
angular
/core'; import { FormsModule }
浏览 0
提问于2019-07-25
得票数 0
回答已采纳
2
回答
在
node js
中
编写反向代理,
调用
django
中
的
接口
python
、
angularjs
、
node.js
、
django
、
reverse-proxy
我
的
前端代码
在
节点httpserver端口127.0.0.1:8081上运行,我
的
后端
服务
在
端口127.0.0.1:9000
的
python django框架
中
运行,同时从
angular
http
方法
调用
后端
服务
时抛出cors异常,所以我
在
节点js
中
编写了一个代理控制器。var
http
= require('
http
&
浏览 20
提问于2016-08-16
得票数 1
回答已采纳
2
回答
将ngStorage设置为变量值(字符串)
angularjs
、
parse-platform
、
local-storage
我正在尝试抽象一个从Parse.com检索数据
的
factory。理想情况下,我希望使用此代码传入要查询
的
类(字符串变量)
的
名称,然后使用与变量相同
的
键将返回值设置为$localStorage (来自)。return errorFactory.checkError(response); }}) 你会注意到,我正在从这个.factory
调用
其他工厂,这会被认为是“糟糕
的
形式”吗?
浏览 0
提问于2015-09-03
得票数 0
3
回答
前缀$
http
url
angularjs
我似乎找不到一个似乎合理
的
问题
的
答案。例如,如果我
的
接口是
http
://myAPi/API/,我希望能
浏览 2
提问于2013-06-18
得票数 8
1
回答
角隐ReferenceError:
服务
未定义
javascript
、
jquery
、
angularjs
、
angular-services
我有以下组件,试图在其中注入
服务
: module('phoneList').', function PhoneListController($
http
, authenticationService; ]该
服务
如下所示: <
浏览 2
提问于2016-09-11
得票数 0
1
回答
Angular
5 Go Webservices
go
、
google-cloud-platform
、
angular5
angular
5
作为
前端和后端,
在
go
中
作为
Golang和written当页面被刷新时,请求被发送到
服务
器,这导致页面未找到404错误,因为请求绕过了
Angular
中
的
路由器。例如:
在
路由中,如果我们
调用
/login,我们可以显示一个页面,但如果刷新相同
的
页面,它将显示为页面未找到404。
Angular
5: const AppRoutes: Route
浏览 3
提问于2017-12-21
得票数 0
回答已采纳
4
回答
通过
服务
调用
$
http
,然后将数据拖到控制器(AngularJS)
中
angularjs
、
json
、
http
、
service
、
controller
编辑应用程序:
服务
:
angular
.module('UsersApp').factory('UserService',fu
浏览 0
提问于2016-02-21
得票数 1
回答已采纳
1
回答
如何从
angular
发出$
http
请求
javascript
、
angularjs
、
node.js
、
express
我
的
代码有一个问题,我似乎不知道如何以及在哪里放置代码来向本地
服务
器发出$
http
请求。module.exports = router;// script.js var app =
angular
.module', function($resource){ return $resource('/api/place');
浏览 1
提问于2016-07-26
得票数 0
2
回答
在
angular
js2.0
中
处理CCAvenue响应
javascript
、
html
、
angular
、
angular-ui-router
、
asp.net-core-2.0
我使用
angular
js2.0
作为
客户端应用程序,它与ASP.Net核心通信以执行
服务
器
调用
。我正在使用ccavenue无缝集成工具包,其中我使用
服务
器
调用
生成加密请求,该
服务
器
调用
包含"www.abc.com/ success“
作为
成功URL。点击www.abc.com网站上
的
购买按钮后,网站将重定向到CCAvenue.com并执行交易,从CCAvenue成功交易后,网站将重定向到提供
浏览 3
提问于2018-02-15
得票数 1
回答已采纳
2
回答
angular
服务
中
的
依赖
HTTP
调用
angular
、
httpclient
、
angular-httpclient
我正在从
angular
服务
调用
安全
的
REST API。在这种情况下,
在
调用
任何API
作为
HTTP
标头
的
一部分传递它之前,我必须获取令牌一次。但是当我从我
的
组件
中
调用
任何函数时,我得到
的
是未定义
的
app_token。这是由于对token_api
的
异步
调用
造成
的
。下一次
调用
成功,
浏览 5
提问于2020-04-18
得票数 0
回答已采纳
1
回答
从角度
调用
web方法会产生错误
javascript
、
c#
、
.net
、
angular
、
asp.net-web-api
我从角10
调用
Rest。CORS策略阻止从源'‘访问 '’:请求
的
资源上不存在“访问控制-允许-原产地”标题。我已经
在
wepapiconfig.cs文件
中
添加了CORS行。 详细资料(CORS_Error.png和WebAPIConfig.png)
浏览 4
提问于2022-08-25
得票数 0
3
回答
如何在
Angular
2
中
进行简单
的
JSONP异步请求?
asynchronous
、
typescript
、
xmlhttprequest
、
angular
、
jsonp
我正在尝试将以下
Angular
1代码转换为
Angular
2:需要JSONP请求才能跳过CORS
浏览 2
提问于2016-03-30
得票数 37
回答已采纳
1
回答
如何将url
作为
参数传递给
在
角js
服务
中
的
ajax方法。
javascript
、
angularjs
、
angular-services
我计划为ajax
调用
提供一个单独
的
服务
。我试图从另一个
服务
调用
该
服务
,但我希望通过一个参数将URL传递给该方法。这是我
的
代码: return { $
浏览 6
提问于2015-12-11
得票数 1
回答已采纳
3
回答
angular
filter控制器或
服务
中
的
$
http
调用
信息
angularjs
、
service
、
controller
我认为最佳实践是使用返回
http
调用
信息
的
服务
作为
promise,并且这些信息应该添加到控制器
的
作用域中。或者
在
服务
中使用单独
的
方法?控制器
中
的
示例:
angular
.forEach(data,function(dataItem, dataIndex){ if(dataItem ===
浏览 1
提问于2015-03-21
得票数 0
1
回答
如何在angularjs中将多个对象
作为
参数从控制器传递到
服务
,然后
在
Api
服务
中
传递
jquery
、
angularjs
我试图
在
方法
调用
中将多个对象
作为
参数从控制器传递到
angular
中
的
服务
层,但我无法传递多个对象。(可以传递单个对象)有人能建议我吗?控制器
的
代码我们如何在
angular
中
检索
服务
浏览 1
提问于2015-03-11
得票数 0
1
回答
如何在java
的
webservises
中
返回json
作为
响应
java
、
angularjs
、
web-services
、
jax-ws
你好,我怀疑如何在Java中将JSON
作为
webservices
的
resopnse返回,以便与AngularJS集成。如果可能的话,请在我们使用services
的
时候发表评论,我们
作为
响应
的
一部分提供
服务
,我们如何将JSON设置为响应。 如果您正在使用.NET web
服务
,则直接支持
调用
服务
中
的
函数。var myApp =
angular
.module("myModule
浏览 4
提问于2017-05-23
得票数 0
回答已采纳
3
回答
在
angularJS
中
绑定
服务
数据
javascript
、
angularjs
我有一个
服务
,用于
在
两个控制器之间共享数据,并检索数据列表: this.data = [];this.loadData = function() { this.data= data; };
浏览 1
提问于2014-05-16
得票数 1
1
回答
在
angular
中使用breezeJs
javascript
、
asp.net-mvc
、
angularjs
、
breeze
我们目前使用
的
是带有
angular
的
微风js。 });
在
我搜索breeze网站后,我发现我们可以使用
angular
$
http
服务
作为
breeze
的
"Ajax实现“,这应该会使我们通过添加以下代码来摆脱$apply()
angular
.module('app'
浏览 1
提问于2014-09-28
得票数 1
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
即时通信 IM
活动推荐
运营活动
广告
关闭
领券