I have a select2 that is populated from the database everything works, receives data from the bank, and so on. but if I want to edit it does not bring the option saved on the screen only on the front if it is debugged it is already in the normal select it brings face understand
this is javascript
$('.js-single').select2({
allowClear: true,
selectOnClose: true,
})
this is the html
<div class="es2 col-md-6">
<label class="lb">País<label class="lb1" data-
toggle="tooltip"
title="ÁREA DE TEXTO OBRIGATÓRIO"> *</label></label>
<select data-toggle="tooltip"
title="ÁREA DE TEXTO OBRIGATÓRIO" required="required"
ng-model="pessoa.pessoasEnderecos.pais.idPais"
ng-options="pai.idPais as pai.nome for pai in paises "
class="js-single"
style="width: 100%; margin-top: -10px;" id="paisPais">
<option ></option>
</select>
</div>
If anyone can help me