1
I have a problem loading the screen with a selected combo item. I’ve tried with jQuery, angular and it didn’t work. I’ve researched other answers around here and it didn’t work any of the alternatives. Does anyone have any idea what it might be ?
<div class=" form-group col-md-3">
<label class="lb">A Rendimento</label>
<select ng-change="selecionaArendimento(nota.flagARendimento)" id="flagRendimento" ng-model="nota.flagARendimento" class="form-control">
<option ng-selected="selected" value="0">Não</option>
<option value="1" >Sim</option>
</select>
</div>
No need to fire a change event in the combo?
– Sam
@dvd I did not understand your questioning...
– Eduardo Krakhecke
It seems to me that a function is called when the combo option is changed (change)... when loading the page, it is necessary to trigger the change event or nothing happens without the user changing a combo option.
– Sam
You want the combo to be selected in the item that is in the model
nota.flagARendimento
, that’s it?– Ricardo Pontual
Edit your question and post the controller with javascript to make it clearer!
– LeAndrade
@Ricardopunctual yes!
– Eduardo Krakhecke
I understand, I put an answer with the code example
– Ricardo Pontual