I have the following array in:
var GruposSanguineos = [
{
Nombre: '0 RH(+)',
Valor: '0+'
},
{
Nombre: '0 RH(-)',
Valor: '0-'
},
{
Nombre: 'A RH(+)',
Valor: 'A+'
},
{
Nombre: 'A RH(-)',
Valor: 'A-'
},
{
Nombre: 'B RH(+)',
Valor: 'B+'
},
{
Nombre: 'B RH(-)',
Valor: 'B-'
},
{
Nombre: 'AB RH(+)',
Valor: 'AB+'
},
{
Nombre: 'AB RH(-)',
Valor: 'AB-'
},
];
I call the array in my controller like this:
$scope.datosLicencia = {
Constantes: {
GruposSanguineos: GruposSanguineos,
},
NuevosDatos: {},
};
I show it in the view in a select as follows:
<tr>
<th class="col-md-3 text-right">Grupo Sanguineo</th>
<td class="col-md-9">
<select class="form-control" name="GrupoSanguineo" id="GrupoSanguineo" ng-model="datosLicencia.NuevosDatos.GrupoSanguineo" ng-options="GrupoSanguineo.Valor as GrupoSanguineo.Nombre for GrupoSanguineo in datosLicencia.Constantes.GruposSanguineos" required>
<option value=""></option>
</select>
</td>
</tr>
I bring the value of the ws select like this:
WSAPP.ConsultaSOAP(Consulta).then(function (response) {
if (!response.CodError) {
$scope.datosLicencia.NuevosDatos.GrupoSanguineo = response.GrupoSanguineo;
} else {
bootbox.alert($scope.datos.Errores[response.CodError]);
}
$.skylo('end');
});
and I get the value of the select like this:
Consulta = {
URL: webServiceLicencias,
Metodo: 'ActualizarLicencia',
Parametros: $scope.datosLicencia.NuevosDatos,
};
The problem is this: when I come into view I would have to show you this way
but it shows me that way
How do I resolve it?