Error when selecting when consulting

0

I have a simple contact form, where I have the main table that is contact with (name, surname, identity_type, identity) and a type-identity table with the fields (id, description)

Using Angular 4, I have an html with the form and I need you to show how to make the selection bring me the description according to the contact id that you consult. if it is new, place select identity type. the following code gives me error

<select
class="form-control" 
id="tipo_identidad_id" 
placeholder="Tipo de Identidad" 
name="tipo_identidad_id" 
[(ngModel)]="contacto.tipo_identidad_id" required>
<option *ngFor="let item of tipoIdentidad">{{ item.descripcion }}</option>
</select>

Angular Driver 4

getTipoIdentidad() {
this.tipoIdentidadService.getTipoIdentidad()
.subscribe((tipoIdentidad) => {
   this.tipoIdentidad = tipoIdentidad;
},
  error => { console.log(<any>error);
  }
);

}

    
asked by mserradas 06.05.2018 в 19:17
source

0 answers