-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactController.js
25 lines (19 loc) · 1.09 KB
/
contactController.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var app = angular.module("contactController",[]);
app.controller('contactController',['$scope','$http','$log','$location','ajaxService','$window', 'userService',function($scope,$http,$log,$location,ajaxService,$window,userService) {
$scope.formdata ={};
$scope.errormessage ="";
$scope.Feedback = function(){
if($scope.formdata.firstName !="" && $scope.formdata.firstName != undefined ||
$scope.formdata.lastName != "" && $scope.formdata.lastName != undefined ||
$scope.formdata.email != "" && $scope.formdata.email != undefined){
$scope.formdata = ajaxService.ajaxCall($scope,$http,$log,"POST","http://www.tutorialspoint.com/json/data.json");
$scope.errormessage = "";
}
else{
$scope.errormessage = ">> First Name, Last Name and Email ID are madatory!!!";
}
}
$scope.cancel = function(){
$scope.errormessage = "";
}
}]);