I'm getting crazy with a simple checkbox.
This is it:
input(type='checkbox', ng-model='auto', ng-checked='auto', ng-change='save()')
So, 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 ckeckbox remain checked...
How should I uncheck that checkbox with AngularJS???
Aucun commentaire:
Enregistrer un commentaire