Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
How to make a function update the value of angular inputs

When I select one of the cards in page below, I wish to have the value of the inputs updated with values from a json object

Example

The json:

{"status":true,"data":[{"id":1,"pessoa_id":75505,"created_at":"2022-02- 
    01T17:42:46.000000Z","holder":"LEONARDO LIMA","validade":"2026-06- 
    01","bandeira":"Mastercard"}]}

The json value is on the variable "responseData"

renderTokenCard(){
this.mundipaggS.checkToken().subscribe((response:any)=> {
console.log( JSON.stringify(response));
this.cartS.tokenCard = response;
this.responseData = response;
console.log( JSON.parse(JSON.stringify(response))    );
}, );

the function that is linked to the select action:

SelecionarCartao(){

    this.mundipaggS.postToken(this.responseData)

    console.log(this.responseData)
}

I wanted to get the responseData value and make a post for the postToken

The HTML

<div class="form-group ">
                                    <label for="ncartao">Número do cartão <span class="text-danger"> *</span></label>
                                    <input name="card-number" maxlength="19"  #cardNumber formControlName="digiNumero" id="ncartao" type="text" class="form-control col-lg-6  " >
                                </div>

                                <div class="form-group">

                                    <label for="nomeimpresso">Nome <b>impresso</b> no cartão<span class="text-danger"> *</span></label>
                                    <input #nomeImpresso formControlName="digiNome"  name="holder-name" id="nomeimpresso" class="form-control col-lg-6" type="text" >
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda