【发布时间】:2016-02-12 18:43:12
【问题描述】:
我正在处理我的前端(Angular Js 调用 Rest 服务),这工作正常,我得到一个很好的 JSON 作为响应:
$scope.test = function(response) {
$http.get("http://localhost:8080/androbridge/test/dotest"+"?s=ssss").success(function(response){
$scope.related=JSON.stringify(response);
});
虽然这不起作用:
var x;
$http.get("http://localhost:8080/androbridge/einloggen/loggeEin?username=" + $scope.username + "&password=" + $scope.password).success(function(response)
{x=JSON.stringify(response);})
if(x=={"Kennzeichnung":"login","Status":true}){
$rootScope.loggedIn=true;
$location.path('/userPage');
}else {
alert('Wrong Login Information'+$scope.username +$scope.password + x)
}
有人看到我犯了什么错误吗?我想不通!
【问题讨论】:
-
你在控制台看到什么错误??
标签: javascript angularjs rest parameter-passing