.controller("selectStudentController",function($scope,$http){
$scope.showStudents = function(){
$http.post("selectStudent.php").then(function(response){
$scope.studentData = response.data;
})
}
})
.controller("saveStudentController",function($scope,$http){
$scope.saveIt = function(){
$http.post("saveNewStudent.php", {"sName" : $scope.sName,
"gender" : $scope.gender,
"salary" : $scope.salary,
"dob" : $scope.dob}
).then(function(response){
alert("Record Saved Successfully...");
$scope.showStudents();
})
}
})
Hi, this is my code. Here, when i call $scope.showStudents();
is not working after Record Saved Successfully... message. Can anybody tell me what is the mistake in it. My record saved and select fine but i unable to call this function.