Semaphore/public/js/services/credentials.js

15 lines
302 B
JavaScript
Raw Normal View History

2014-08-25 12:35:49 +02:00
define([
'app'
], function(app) {
app.registerService('credentials', function($http, $rootScope) {
var self = this;
self.getCredentials = function(cb) {
$http.get('/credentials').success(function(data) {
$rootScope.credentials = self.credentials = data;
cb();
});
}
});
});