Semaphore/public/js/controllers/playbook/playbook.js

16 lines
409 B
JavaScript
Raw Normal View History

2014-08-25 01:02:34 +02:00
define([
'app'
], function(app) {
2014-08-25 01:24:40 +02:00
app.registerController('PlaybookCtrl', ['$scope', '$state', '$rootScope', '$http', function($scope, $state, $rootScope, $http) {
2014-08-25 01:02:34 +02:00
console.log($scope.playbook);
2014-08-25 01:24:40 +02:00
$scope.delete = function () {
$scope.playbook.delete();
$http.get('/playbooks').success(function(data, status) {
$rootScope.playbooks = data;
});
$state.transitionTo('homepage');
}
2014-08-25 01:02:34 +02:00
}]);
});