Semaphore/public/js/services/users.js

15 lines
249 B
JavaScript
Raw Normal View History

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