Semaphore/public/js/services/playbooks.js

15 lines
292 B
JavaScript
Raw Normal View History

2014-08-25 12:35:49 +02:00
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();
});
}
});
});