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

119
Vistas
.bind(this) gives old value and then updates new values

The .bind(this) gives the old values first and then updates with the new value which is not the right way to bind every time it should give the fresh value.

Here is the parent component function ts

this.openEdgeTokenSuccessCallback = this.openEdgeTokenSuccessCallback.bind(this);

openEdgeTokenSuccessCallback(reason) {
  console.log(response, 'value');
}

parent HTML

<sc-ui-ezi-debit-card [onTokenSuccess]="openEdgeTokenSuccessCallback"></sc-ui-ezi-debit-card>

first, it gives 1 value and then 2 as value but I need this as 2 fresh values because 1 I have already used but when I again call the same function it gives first value 1 and then values 2

JS function

export function SetupOpenEdgeEziDebit(tokenSuccessFunction) {
  secureEntryForm.onResult(tokenSuccessFunction);
}

child component ts :

ngOnInit(): void {
  this.awaitOpenCardLessEdge();
}

private awaitOpenCardLessEdge(): void {
  // Call open edge to start loading in the iframes.
  SetupOpenEdgeEziDebit(this.onTokenSuccess);
  console.log(this.onTokenSuccess)
}

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