mardi 28 juin 2016

angular checkbox does not bind to model

In my controller I have this member:

$scope.sameOptionsOnReturn = true;

and in my view:

<input type="checkbox"
       ng-model="sameOptionsOnReturn"
       ng-checked="sameOptionsOnReturn"
       ng-value="true"
       ng-change="setReturnOptions" />

But the input does not bind to the checkbox; it's always true. What is wrong?




Aucun commentaire:

Enregistrer un commentaire