Siguiendo este tutorial: https://angular.io/api/forms/FormControlName#use-with-ngmodel
Tengo el siguiente código:
form = new FormGroup({
first: new FormControl('Nancy', Validators.minLength(2)),
last: new FormControl('Drew'),
});
y voy a asignar valores a mi form
this.personaService.get(id).then(persona=> this.form.setValue(persona));
persona tiene lo siguiente:
{first: 'Carson', last: 'Drew', adress: 'Calle stackoverflow'}
y el error que me da es:
Uncaught (in promise): Error: Cannot find form control with name: adress.
¿cómo puedo evitar inicializar adress en el this.form? El API me devuelve otros atributos pero solo usaré el 'first' and 'last', NOTA: no se puede cambiar el api para que solo me devuelva lo que necesito