I am using a checkbox binded to a $scope
variable in AngularJS. My code is something like:
<input type="checkbox" ng-model="value.selected">
and I have an object in my controller $scope.value
which has the selected
property. The changes in the DOM i.e. clicking the checkbox changes the values of the selected
property in the value
object but the vice versa, i.e. if I change the selected
property in the controller it doesn't change the DOM checkbox. Any suggestions or workarounds would be welcome.
Aucun commentaire:
Enregistrer un commentaire