5
Well I want select to start with a selected value, this value already comes in my ng-model:
<label class="format">SELECIONE:</label>
<span class="format">
<select name="grupo" id="grupo" data-ng-model="vm.grupoSelecionado.codigo">
<option data-ng-repeat="grupo in vm.listaGrupos" value="{{ grupo.codigo }}">{{grupo.descricao}}</option>
</select>
</span>
ie, my vm.group.codigo already comes my selected value, the same is inside the list of ng-repeat, how to start it loaded?
I did it this way, and it keeps coming blank the selected.
– War Lock
@Warlock The above example works for you?
– OnoSendai
Logically yes, but it doesn’t work.
– War Lock
vm.groupSelected. has an object, group, so it’s like, vm.groupSelecturer.group changes something? I had forgotten to post here
– War Lock
@Warlock this information was not present in the original question - yes, it changes; I adjusted the example.
– OnoSendai
It worked, the problem was in the backend that was coming the wrong code. (other than what was in select) then he would never find, but his example saved me. VLW
– War Lock