define(['angular', 'admin/admin'], function (angular, admin) { return admin .controller("WebconfigSettingsController", ["$q", "$http", "$scope", function ($q, $http, $scope) { $scope.GetSettings = function () { $http({ method: 'POST', url: '/Admin/GetWebconfigSetting', }).success(function (data) { $scope.Settings = data; }); } $scope.GetDropDown = function () { $http({ method: 'POST', url: '/Admin/GetSettingsDropdown', }).success(function (data) { $scope.PossibleSettings = data; }); } $scope.GetSettings(); $scope.GetDropDown(); $scope.showMessage = false; $scope.ChangeSetting = function () { $http({ method: 'POST', url: '/Admin/ChangeSetting', data: { settingName: $scope.SettingName, value: $scope.SettingValue } }).success(function (data) { $scope.Message = data; $scope.showMessage = true; $scope.GetSettings(); $scope.SettingName = ""; $scope.SettingValue = ""; }); } }]); });