I'm trying to make a checkbox that show the value from a controller, and a checkbox next to it that should be ticked when that value is filled. It also need to be able to be ticked off and on, but I can't get it to work:
<input type='checkbox'
ng-false-value="''"
ng-model="entry[element.propertyName]"
id="q{{element.id}}"
ng-checked="entry[element.propertyName] != ''"
>
The checkbox is ticked when entry[element.propertyName] is filled, so far so good. But when I untick the selectbox the mode remains unchanged, even though I set ng-false-value, and the 'selected=selected´ attribute doesn't disappear. When I select and unselect again, then the model starts to change to true and ''
Should be the easiest thing in the world, what am I missing here?
I'm using Angular 1.3.11
Aucun commentaire:
Enregistrer un commentaire