Initial value in oi-select

1

I have the following select:

<span>Primer aspecto critico <span class="text-danger">*</span></span>
<oi-select 
  oi-options="x.id as (x.pregunta.nombre ) for x in preguntas track by x.id"
  ng-model="informe.aspCritico1" 
  placeholder="Seleccione el primer aspecto critico"
  required
  >
</oi-select>

Which is a select that comes preloaded with questions that I have in a variable, the system works perfectly and saves the data, the problem is when I want to edit what is already saved, the idea is that in the select a data appears previous in case it exists.

If I make a console.log to the variable report.aspCritico1 it brings me the id but for some reason it does not show me the name in the select.

What could it be?

Thank you!

    
asked by JuanManuel245 04.12.2018 в 15:55
source

0 answers