function ctrl($http,$scope){
var url = '../login/save.html',
transFn=function(obj) {
var str = [];
for(var p in obj){
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
}
return str.join("&").toString();
};
$scope.login = function(user){
var data=transFn(user);
$http.post(url+"?"+data).success(function(data, status, headers, config){
if (data.success){
}else{
}
}).error(function(data, status, headers, config){
alert("error");
});
};
}