//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. 第二次作业(Git and Github)

       第二次作业(Git and Github) 1.Github项目地址: https://github.com/YanSiJu/JavaWebProject.git 具体介绍详见READ.md 2 ...

  2. gluon实现softmax分类FashionMNIST

    from mxnet import gluon,init from mxnet.gluon import loss as gloss,nn from mxnet.gluon import data a ...

  3. SSH 本地和服务器传输

    [转]https://www.cnblogs.com/magicc/p/6490566.html SCP 使用方式如下: 1.上传本地文件到服务器 scp /path/filename usernam ...

  4. Catalan数列

    引入 今天听学长讲了卡特兰数列后对其有了更深的认识,在此完善了一下之前的博客加以总结. 首先用一个经典的例子来描述一下Catalan数列,我们有一个1~n的数列和一个大小为n的栈,我们有如下两种操作: ...

  5. 深入 Struts2 的配置 - 处理多个请求-处理请求结果-模型驱动-异常机制

    转:http://www.java3z.com/cwbwebhome/article/article2/2938.html?id=1631 本部分主要介绍struts.xml的常用配置. 1.1.   ...

  6. 总结的MR中连接操作

    1 reduce side join在map端加上标记, 在reduce容器保存,然后作笛卡尔积缺点: 有可能oom 2 map side join  2.1 利用内存和分布式缓存,也有oom风险 2 ...

  7. 一个JS对话框,可以显示其它页面,

    还不能自适应大小 garyBox.js // JavaScript Document// gary 2014-3-27// 加了 px 在google浏览器没加这个发现设置width 和height没 ...

  8. ZooKeeper下载安装(Windows版本)

    进入Apache ZooKeeper官方网站进行下载,https://zookeeper.apache.org/releases.html 这里我们选择zookeeper-3.4.12版本进行下载 百 ...

  9. 基于Cent os 云服务器中SVN 服务器的搭建---具体实践是可行的 一次备注便于后续查找

    https://blog.csdn.net/shadowyingjian/article/details/80588544http://www.hongyanliren.com/2015m04/329 ...

  10. 零基础Python知识点回顾(三)

    元组 元组是用圆括号括起来的,其中的元素之间用逗号隔开.(都是英文半角)tuple(元组)跟列表类似是一种序列类型的数据,特点就是其中的元素不能更改 既然是有序的,那么,嘿嘿,不错,它也可以有索引,能 ...