mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-09 19:15:12 +08:00
removeSite()
This commit is contained in:
@@ -407,6 +407,16 @@
|
||||
$scope.site = $scope.data.sites.length - 1;
|
||||
};
|
||||
|
||||
$scope.removeSite = function(site) {
|
||||
$scope.data.sites.splice(site, 1);
|
||||
|
||||
if ($scope.data.sites[$scope.site] === undefined) {
|
||||
$scope.site--;
|
||||
}
|
||||
|
||||
$timeout(calculateChanges);
|
||||
};
|
||||
|
||||
$scope.setSite = function(site) {
|
||||
$scope.site = site;
|
||||
$timeout(calculateChanges);
|
||||
|
Reference in New Issue
Block a user