/** * 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); }); } }; }]);