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'
|
url: '/api/simple/v2'
|
||||||
}).
|
}).
|
||||||
success(function (data, status, headers, config) {
|
success(function (data, status, headers, config) {
|
||||||
gpower.refresh(message.data.power);
|
|
||||||
$scope.simple = data;
|
$scope.simple = data;
|
||||||
|
gpower.refresh(data.power);
|
||||||
}).
|
}).
|
||||||
error(function (data, status, headers, config) {
|
error(function (data, status, headers, config) {
|
||||||
//$scope.name = 'Error!'
|
//$scope.name = 'Error!'
|
||||||
|
@ -20,8 +20,8 @@ angular.module('roomstateapp.controllers', []).
|
||||||
|
|
||||||
Socket.on('sdata', function(message) {
|
Socket.on('sdata', function(message) {
|
||||||
console.log("received data from server: " + message.data.names);
|
console.log("received data from server: " + message.data.names);
|
||||||
gpower.refresh(message.data.power);
|
|
||||||
$scope.simple = message.data;
|
$scope.simple = message.data;
|
||||||
|
gpower.refresh(message.data.power);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue