How to call function once on max length of input in Angular?

95 views Asked by At

Here is simple function I want to call confirm when input length = 6 but the issue in this way is that some time it call multiple time same function on max length. I want to call function once only when max length reach.

 onOtpChange(event: any) {
    if (event.length == 6) {
      this.authcode = event
      this.confirm();
    }
  }

Call function at once on max input length

0

There are 0 answers