-1
I have the following code (with the listing working OK):
<select
ng-model="elementoAtivo.tipo"
ng-init="elementoAtivo.tipo = elementoAtivo.tipo"
ng-options="a.valor as a.opcao for a in [{'valor':0,'opcao':'SIMPLES'},{'valor':1,'opcao':'COMPLEXO'},{'valor':2,'opcao':'TESTE'}]">
</select>
I want to initialize Option with a value that is coming in the model elementAtivo.type which is an integer between 0 and 3), but it starts the empty dropdown and when I click it shows the other options.
How do I check if the value of elementAtivo.type is the same as one of the options I put in ng-options and with that already initialize with it marked?