I have the following checkbox:
input(type='checkbox', ng-model='auto', ng-checked='auto', ng-change='save()')
As soon as I save it from the method in ng-change it save the auto value correctly but the app also listen to SSE (Server Sent Events) to update that value:
A simple example:
$scope.$watch(Auto.getNewValue, function (newAutoValue) {
if (newAutoValue !== null) {
$scope.auto = newAutoValue;
}
});
Even if from the $watch the value is false but previously I checked it the checkbox remains checked. How can I uncheck that checkbox with AngularJS?
savefunction?