Add user service and reorganize services. Messy commit but it's a start.

This commit is contained in:
Simo Kinnunen
2014-01-31 15:52:16 +09:00
parent f9da1cb0bf
commit 7c0e04c4b4
12 changed files with 102 additions and 22 deletions

View File

@@ -0,0 +1,16 @@
define(['./module'], function(mod) {
function UserServiceFactory($http) {
var userService = {
info: {}
}
$http.get('/api/v1/user')
.success(function(data) {
userService.info = data.user
})
return userService
}
mod.factory('userService', ['$http', UserServiceFactory])
})