define(['angular', 'admin/admin'], function (angular, admin) { return admin .controller("RespondController", ["$q", "$http", "$scope", function ($q, $http, $scope) { $scope.SetAllocateTo = function () { $http({ method: 'POST', url: '/Admin/setAllocateTo', data: { person: $scope.AllocateToPerson} }).success(function (data) { console.log("Success") }); } $scope.init = function () { $http({ method: 'POST', url: '/Admin/GetCurrentAllocateTo', data: { person: $scope.AllocateToPerson } }).success(function (data) { $scope.AllocateToPerson = data; }); } $scope.init(); $scope.haveYourSay = { Category: "Compliment", Type:"Website", PolicyNumber: "958465958", Title: "Mr", Surname: "Test", ContactNumber: "0821234123", Comment: "Test Comment", Email:"justinro@telesure.co.za" } $scope.TestCase = function () { $http({ method: 'POST', url: '/haveYourSayBlock/RespondCase', data: $scope.haveYourSay }).success(function (data) { $scope.caseNumber = data; }); } }]); });