0
在AngularJS,我已经定义了一个服务AngularJS其余服务忽略端口号
ngnServices.factory( '登录',[ '$资源',函数($资源){
return $resource("http://localhost:8080/logon", {}, {
get: {method: 'GET', cache: false, isArray: false},
save: {method: 'POST', cache: false, isArray: false},
update: {method: 'PUT', cache: false, isArray: false},
delete: {method: 'DELETE', cache: false, isArray: false},
});
然而,当我尝试调用定义的“获得”的方法,角使用URL “http://localhost/logon”,忽略了端口
任何建议
此答案有效。谢谢埃利亚斯! – garey