<div class="col-xs-12 input_formulario" ng-init="vm.tipoSeguro()">
<select name="setor_destino" required="" ng-model="user.tipoSeguro" >
<option value="">Nome do seguro</option>
<option ng-repeat="seguros in vm.mostraTipoSeguro track by seguros.id" value="{{seguros.nome}}">{{seguros.nome}}</option>
</select>
</div>
The ng-model I have there in select is to send the selected value to the function in the controller that sends the form via email.
Followed HTML made with Gabriel's answer Camera:
<select name="setor_destino" required="" ng-model="user.tipoSeguro" >
<option value="">Nome do seguro</option>
<option ng-repeat="seguros in vm.mostraTipoSeguro track by seguros.id" value="{{seguros.nome}}" ng-selected="seguros.id == vm.cookie">{{seguros.nome}}</option>
</select>
And my controller:
vm.tipoSeguro = function () {
SimulacaoService.listaTipoSeguro().then(function (response) {
if (response.data != 0) {
vm.mostraTipoSeguro = response.data;
vm.cookie = $.cookie("nome_seguro");
$.removeCookie("nome_seguro");
} else {
vm.mostraTipoSeguro = '';
}
}, function (error) {
console.error(error);
});
}