mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 12:55:26 +02:00
Add user service and reorganize services. Messy commit but it's a start.
This commit is contained in:
@@ -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
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user