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