Skip to content

Instantly share code, notes, and snippets.

@maltzsama
Last active January 3, 2016 22:19
Show Gist options
  • Select an option

  • Save maltzsama/8527348 to your computer and use it in GitHub Desktop.

Select an option

Save maltzsama/8527348 to your computer and use it in GitHub Desktop.
var module = angular.module('SCVerticals');
module.controller('VerticalCtrl', ['$scope', '$modal', 'Verticals',
function ($scope, $modal, Verticals) {
$scope.verticals = Verticals.query();
$scope.deleteVertical = function (vertical) {
Verticals.delete(vertical);
}
$scope.deleteModal = function (vertical) {
var modalInstance = $modal.open({
templateUrl: 'Client/Authentication/vertical_delete_modal.html',
controller: 'DeleteCtrl',
backdrop: 'static',
keyboard: false
});
};
}]);
module.controller('VerticalNewCtrl',['$scope', '$modal', 'Verticals',
function ($scope, $modal, Verticals) {
}]);
module.controller('VerticalEditCtrl', ['$scope',
function ($scope) {
}]);
module.controller('DeleteCtrl', ['$scope', '$modalInstance', 'Verticals',
function ($scope, $modalInstance) {
$scope.deleteVertical = function () {
Verticals.delete(vertical);
$modalInstance.close();
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment