Answers for "set angular FormControl setValue"

0

set angular FormControl setValue

const objRequest = {
  operacion: 'getValuesById',
  data: { id: this.id }
};

const response = this.paymentService.myHttp( objRequest );

response.pipe(first()).subscribe(
  objResponse => {
    this.checkoutForm.get( 'name' ).setValue( objResponse.collection[0].nombre );
    this.checkoutForm.get( 'email' ).setValue( objResponse.collection[0].email );
    this.checkoutForm.get( 'numAcount' ).setValue( objResponse.collection[0].numAcount );
    this.checkoutForm.get( 'bank' ).setValue( objResponse.collection[0].bank_id );
  },
  error => {
    console.log(error);
  }
);
Posted by: Guest on May-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language