更新时间:2022-10-23 08:06:10
scope.Validate = function(){
scope.Email = {};
http.get(' index.php / Welcome / EmailCheck')。success(function(result) ){
$scope.Validate = function () {
$scope.Email = {};
$http.get('index.php/Welcome/EmailCheck').success(function (result) {
$scope.Email = result;
console.log(result);
});
};
$scope.submitForm = function () {
if ($scope.Email.Email === $scope.user.Email) {
console.log("Mail Id Alresdy Exists");
}
else
{
$http({
method: 'POST',
url: 'index.php/Welcome/Signup',
data: $scope.user,
headers: {'Content-Type': 'application/x-www-form-urlencode'}
}).success(function (data) {
$scope.Enquiry = data;
console.log(data);
$location.path('/EnquiryResponse');
});
}
;
};
in Validate function $scope.Email getting all Email ids from database and it is a arraylist,
in Submitform function i got a single Email Id from ui i have stored the Email in $scope.user.Email.
now i want to check single Email($scope.user.Email) is Existing or not in Many Email Id($scope.Email)...
scope.Validate = function () {
scope.Email = {};
http.get('index.php/Welcome/EmailCheck').success(function (result) {