1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

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

@ -1,12 +1,11 @@
define(['./module', 'oboe'], function(mod, oboe) {
mod.controller('DeviceListCtrl', ['$scope', function($scope) {
$scope.devices = []
function DeviceListCtrl($scope, deviceService) {
$scope.devices = deviceService.devices
}
oboe('/api/v1/devices')
.node('$devices[*]', function(devicesLoadedSoFar) {
$scope.$apply(function() {
$scope.devices = devicesLoadedSoFar
})
})
}])
mod.controller('DeviceListCtrl'
, [ '$scope'
, 'deviceService'
, DeviceListCtrl
])
})