Semaphore/public/js/services/playbooks.js
2014-08-25 11:35:49 +01:00

15 lines
292 B
JavaScript

define([
'app'
], function(app) {
app.registerService('playbooks', function($http, $rootScope) {
var self = this;
self.getPlaybooks = function(cb) {
$http.get('/playbooks').success(function(data) {
$rootScope.playbooks = self.playbooks = data;
cb();
});
}
});
});