//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. 百度地图JavaScript开发入门先知

    最近项目紧急开发了一些百度地图的功能,觉得百度地图实数强大!于是今天不忙总结一下,看到不错的文章先转载. 文章出处:https://www.opengps.cn/Blog/View.aspx?id=1 ...

  2. python入门18 继承和多态

    继承:子类继承父类的属性和方法  class 子类名(父类1,父类2) 多态:子类重写父类的方法 判断对象是否是某个类的实例:  isinstance(object,class) 父类-汽车类 #co ...

  3. CRUD全栈式编程架构之服务层的设计

    服务层代码 首先我先放出2个主要类的代码再分别讲解 接口 using System; using System.Collections.Generic; using System.Linq; usin ...

  4. Snippets代码块分享网站

    复习时,看老师之前贴在网上的一些代码,顺便搜集了一些代码块Snippets分享网站 http://paste.ubuntu.com/ 简约简单,一如既往Linux风,我之前用的也是这款,但已转gite ...

  5. Python:运算与循环

    1.格式化输出 name = input("请输入你的名字:") age =input("请输入你的年龄:") job =input("请输入你的工作 ...

  6. 【luogu P3389 高斯消元法】 模板

    题目链接: gauss消元求线性方程组的解. 这道题对于多解和无解都输出No solution #include <algorithm> #include <cstdio> # ...

  7. nineoldandroid 详细使用并且实现drawerlayout侧滑动画

    nineoldandroid.view.ViewHelpe是一个为了兼容3.0以下的一个动画开源库 相关函数解读:(第一个参数都为动画对象,第二个为动画属性值的变化表达式) ViewHelper.se ...

  8. Python使用dict和set

    dict Python内置了字典:dict的支持,dict全称dictionary,在其他语言中也成为map,使用键-值(key-value)存储,具有极快的查找速度. 假设要根据同学的名字查找对应的 ...

  9. 前端 new和instanceof JavaScript

    new和instanceof的内部机制 new 代码例子 var Func=function(){ }; var func=new Func (); new共经过4个阶段 1.创建一个空对象 var ...

  10. SpringCloud微服务实战:一、Eureka注册中心服务端

    1.项目启动类application.java类名上增加@EnableEurekaServer注解,声明是注册中心 1 import org.springframework.boot.SpringAp ...