如何在Angularjs中验证具有单值的数组列表值 [英] How Do I Validate Array List Values With Single Value In Angularjs
本文介绍了如何在Angularjs中验证具有单值的数组列表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
if ($scope.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');
});
}
$scope.Email is a array list it have many emails i want to validate with single email by $scope.user.Email
推荐答案
scope.Email == =
scope.Email ===
scope.user.Email){
console.log( 邮件ID Alresdy存在);
}
else
{
scope.user.Email) { console.log("Mail Id Alresdy Exists"); } else {
http({
method:< span class =code-string>' POST',
url:' index.php / Welcome / Signup',
data:
http({ method: 'POST', url: 'index.php/Welcome/Signup', data:
这篇关于如何在Angularjs中验证具有单值的数组列表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文