cf8b0fb9
Nung Poti
template master
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/**
* Created by Develop-SC on 30/6/2559.
*/
angular.module('Customer', [])
.controller('CtrlCustomer', ['$scope', '$http', function($scope, $http) {
$scope.addCustomer = function() {
//var conCheck = confirm(' คุณแน่ใจว่าหรือไม่ว่าจะเพิ่ม \n\n Username : '+$scope.contact.username+'\n Mac Address : '+$scope.contact.macaddr);
var conCheck = true;
if(conCheck){
$scope.check = false;
$http.post(host+'/api/customer', $scope.contact).success(function(response) {
$scope.contactlist = response;
$scope.check = false;
console.log(response);
});
}
};
}]);
|