diff --git a/pages/ambassador.html b/pages/ambassador.html index efc3068..993abab 100644 --- a/pages/ambassador.html +++ b/pages/ambassador.html @@ -33,7 +33,7 @@
email
- + @@ -42,7 +42,7 @@
phone
- + diff --git a/script.js b/script.js index 5565a79..7f70b81 100644 --- a/script.js +++ b/script.js @@ -24,7 +24,7 @@ }) // route for the ambassador page - .when('/ambassador', { + .when('/startupJalsaPromocode', { templateUrl: 'pages/ambassador.html', controller: 'ambassadorController' }) @@ -1075,55 +1075,55 @@ $('#alreadyExist').css('display', 'none'); }; - $scope.emailcheck = function(val) { - consol.log("kdsbd") - $scope.space = /\s/g.test(val); - console.log("space",$scope.space) - if (val == undefined) { - $('#invalidEmail').css('display', 'block'); - } else { - $http({ - method: 'GET', - url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', - headers: {} - }).then(function mySuccess(searchResult) { - console.log("searchResult1===>", searchResult) - if (searchResult.data.length == 0) { - $scope.check = false; - } else { - $scope.check = true; - $('#alreadyExist').css('display', 'block'); - } - }, function myError(error) {}); - } - }; - - $scope.removeNoError = function() { - $('#invalidNumber').css('display', 'none'); - $('#noExist').css('display', 'none'); - }; - - $scope.numbercheck = function(number) { - // if (val == undefined) { - // $('#invalidNumber').css('display', 'block'); - // } else { - $http({ - method: 'GET', - url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}', - data: $scope.data, - headers: {} - }).then(function mySuccess(searchResult) { - console.log("searchResult===>", searchResult) - if (searchResult.data.length == 0) { - $scope.numberCheck = false; - } else { - $scope.numberCheck = true; - $('#noExist').css('display', 'block'); - } - }, function myError(error) {}); - //} - - }; + // $scope.emailcheck = function(val) { + // consol.log("kdsbd") + // $scope.space = /\s/g.test(val); + // console.log("space",$scope.space) + // if (val == undefined) { + // $('#invalidEmail').css('display', 'block'); + // } else { + // $http({ + // method: 'GET', + // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', + // headers: {} + // }).then(function mySuccess(searchResult) { + // console.log("searchResult1===>", searchResult) + // if (searchResult.data.length == 0) { + // $scope.check = false; + // } else { + // $scope.check = true; + // $('#alreadyExist').css('display', 'block'); + // } + // }, function myError(error) {}); + // } + // }; + + // $scope.removeNoError = function() { + // $('#invalidNumber').css('display', 'none'); + // $('#noExist').css('display', 'none'); + // }; + + // $scope.numbercheck = function(number) { + // // if (val == undefined) { + // // $('#invalidNumber').css('display', 'block'); + // // } else { + // $http({ + // method: 'GET', + // url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}', + // data: $scope.data, + // headers: {} + // }).then(function mySuccess(searchResult) { + // console.log("searchResult===>", searchResult) + // if (searchResult.data.length == 0) { + // $scope.numberCheck = false; + // } else { + // $scope.numberCheck = true; + // $('#noExist').css('display', 'block'); + // } + // }, function myError(error) {}); + // //} + + // }; $scope.submit = function() { console.log($scope.data.name)