//post json 时收不到数据,目前只找到方法post form形式的key-value值

//关键是设置  headers: { 'Content-Type': 'application/x-www-form-urlencoded' }和data:'login=zyip@qq.com'

app.factory('googleBusiness', ['$window','$http', function(win,$http) {
var document=win.document;
return {
getGoogleUserName:function(url,loginUser,successCallBack){
var toUrl='/googlecfg/GetGoogleAccountByLoginName/';
toUrl='http://localhost:7683/home/index';
$http({
url:toUrl,
method: "POST",
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
,data:'login=zyip@qq.com'
}).success(successCallBack);
},
saveGoogleUserName:function(loginUser,googleUserName){ }
}; }]);

angularjs post data的更多相关文章

  1. AngularJS - Passing data between pages

    You need to create a service to be able to share data between controllers. app.factory('myService', ...

  2. [AngularJS] Accessing Data in HTML -- controllerAs, using promises

    <!DOCTYPE html> <html> <head> <title>Access Data From HTML</title> < ...

  3. AngularJS Tabular Data with Edit/Update/Delete

    效果 首先,我们先建立一些数据,当然你可以从你任何地方读出你的数据 var app = angular.module('plunker', ['ui.bootstrap']); app.control ...

  4. AngularJS基础总结

    w3shools    angularjs教程  wiki   <AngularJS权威教程> Introduction AngularJS is a JavaScript framewo ...

  5. angularJS 传参的四种方法

    AngularJS - Passing data between pages 著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处.作者:Ye Huang链接:https://www.z ...

  6. springmvc4开发rest

    Spring MVC 4 RESTFul Web Services CRUD Example+RestTemplate Created on:  August 11, 2015  | Last upd ...

  7. Angular1.x 基础总结

    官方文档:Guide to AngularJS Documentation   w3shools    angularjs教程  wiki   <AngularJS权威教程> Introd ...

  8. AngularJS $http配置为form data 提交

    AngularJS $http配置为form data 提交 $scope.formData = {}; $http({ method: 'POST', url: '/user/', // pass ...

  9. AngularJS进阶(十五)Cookie 'data' possibly not set or overflowed because it was too large

    Cookie 'data' possibly not set or overflowed because it was too large (5287 > 4096 bytes)! 注:请点击此 ...

随机推荐

  1. day2-基础 变量,判断,循环

    1.第一个程序 print ("Hello World!") 输出: 1 Hello World 2.第一个变量 a = ( print (a) 输出: Hello World 3 ...

  2. Orchard Core 使用模板创建Module

    根据官方示例:https://orchardcore.readthedocs.io/en/latest/Templates/README/#create-a-new-module 执行以下命令: do ...

  3. Visual Studio 2012 未找到与约束 ContractName问题,及printf unsafe问题

    1.用VS 2012 创建c++项目失败,提示未找到与约束 ContractName .............的错误 解决办法:下载VS 2012 补丁,很小的一个补丁,不过很管用 地址:http: ...

  4. SQA冲刺

    下学期的第三次冲刺 一 SQA是什么 软件质量保证的目的是使软件过程对于管理人员来说是可见的.它通过对软件产品和活动进行评审和审计来验证软件是合乎标准的.软件质量保证组在项目开始时就一起参与建立计划. ...

  5. 异常:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

    Spring3.0 + Hibernate3.5:启动服务器报:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany. ...

  6. 【洛谷5280】[ZJOI2019] 线段树(线段树大力分类讨论)

    点此看题面 大致题意: 给你一棵线段树,两种操作.一种操作将每棵线段树复制成两个,然后在这两个线段树中的一个上面进行\(Modify(l,r)\).另一种操作询问所有线段树的\(tag\)总和. 大力 ...

  7. HDU 3336 KMP

    题意:求每一个前缀,跟前缀相同的每个子串. 此题:网上很多都是假程序,不过也AC了,的确我测试几个案例之后的的确确是存在这个问题. 分析:每一个前缀,可以考虑KMP,f失配指针,如何求得它出现了多少次 ...

  8. Oracle文本导入器

    将文本格式化为Tab分隔的数据行,可以用Excel搞定 如果新增列需要从前面的列获取数据,比如用身份证号计算年龄 需要保证新增列在导入的文件中实际存在列,否则无法使用相对位置和绝对位置进行取值 相对位 ...

  9. 【luogu P2860 [USACO06JAN]冗余路径Redundant Paths】 题解

    题目链接:https://www.luogu.org/problemnew/show/P2860 考虑在无向图上缩点. 运用到边双.桥的知识. 缩点后统计度为1的点. 度为1是有一条路径,度为2是有两 ...

  10. PAT 1063. Set Similarity

    1063. Set Similarity 题目大意 给定 n 个集合, k 个询问, 求任意两个集合的并集和合集. 思路 一道裸的考察 STL 中 set 的题, 我居然还用 hash 错过一遍, 用 ...