$scope.$watch("view.wdg['currentGauge']['text']", function() {
if($scope.view.wdg['currentGauge']['text'] > 5) {
$scope.view.wdg['currentGauge']['src'] = 'app/resources/Uploaded/current_red.png';
}
else if($scope.view.wdg['currentGauge']['text'] > 1) {
$scope.view.wdg['currentGauge']['src'] = 'app/resources/Uploaded/current_green.png';
}
else{
$scope.view.wdg['currentGauge']['src'] = 'app/resources/Uploaded/current_yellow.png';
}
});