Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
.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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!