I have the following html:
<label class="item item-input item-stacked-label" ng-repeat="nl in normativas">
<select ng-model="nl.idResultado">
<option value="1">CUMPLE</option>
<option value="2">NO CUMPLE</option>
<option value="3"> NO APLICA </option>
</select>
</label>
<button ng-click="guardarNormativas()"> Guardar</button>
This html is used so that the user can select an option of the select, that value (1, 2, 3) is stored inside "nl.idResultado". and when the button is pressed the data of this object is saved in a db sqlite.
Everything is kept perfect, "n1.idResult" takes the value 1,2,3 depending on the user's choice.
The problem occurs when editing, I USE THE SAME html to show the select with the selected option (which was previously saved).
"nl.idResultado" let's say that it contains 1 (check that I get it from the DB), but the select is empty, it should be generated with the option selected by default "CUMPLE".
Why does this happen? ... What am I doing wrong?