mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
Switch to a more consistent naming convention for services and resource loading.
This commit is contained in:
17
res/app/scripts/services/UserService.js
Normal file
17
res/app/scripts/services/UserService.js
Normal file
@@ -0,0 +1,17 @@
|
||||
define(['./_module'], function(services) {
|
||||
function UserServiceFactory($http) {
|
||||
var userService = {
|
||||
}
|
||||
|
||||
userService.user = (function() {
|
||||
var userPromise = $http.get('/api/v1/user')
|
||||
return function() {
|
||||
return userPromise
|
||||
}
|
||||
})()
|
||||
|
||||
return userService
|
||||
}
|
||||
|
||||
services.factory('UserService', ['$http', UserServiceFactory])
|
||||
})
|
||||
Reference in New Issue
Block a user