Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
.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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda