fixing an error with the gage loading at page reload
This commit is contained in:
parent
52aa2837df
commit
97a07163f2
|
@ -10,8 +10,8 @@ angular.module('roomstateapp.controllers', []).
|
|||
url: '/api/simple/v2'
|
||||
}).
|
||||
success(function (data, status, headers, config) {
|
||||
gpower.refresh(message.data.power);
|
||||
$scope.simple = data;
|
||||
gpower.refresh(data.power);
|
||||
}).
|
||||
error(function (data, status, headers, config) {
|
||||
//$scope.name = 'Error!'
|
||||
|
@ -20,8 +20,8 @@ angular.module('roomstateapp.controllers', []).
|
|||
|
||||
Socket.on('sdata', function(message) {
|
||||
console.log("received data from server: " + message.data.names);
|
||||
gpower.refresh(message.data.power);
|
||||
$scope.simple = message.data;
|
||||
gpower.refresh(message.data.power);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue