1
我想使用角度来构建一个简单的认证,它使ajax服务调用时出现此错误。这是代码。无法读取与角度未定义的属性'获得'
代码
mainModule.controller("loginController", ['$scope', '$http', '$rootScope', '$presence', '$apps', '$helpers',
function($scope, $http, $rootScope, $presence, $apps, $helpers) {
$scope.currentUser;
$scope.password;
$rootScope.url = "http://localhost:53455/eSuperVision.svc";
$scope.login = function($scope, $http) {
$http.get($rootScope.url + "/login/" + $scope.currentUser + "/" + $scope.password).success(function(response) {
if (response == true) {
location.href = "home.html";
} else {
$("#loginDialog").effect("shake");
$scope.showError = true;
}
});
}
}
]);
您28秒打我:P – 2015-04-03 11:59:46