A small standalone Angular form checks a work email before sending an invitation. After a recent PR, the behavior became unstable: sometimes the submit button becomes enabled for the wrong value, and re-checking an already entered address does not run.
email field is required:
email format from the reactive form is used.Check button is clicked.Save is allowed only when all of the following are true at the same time:
Check again for the same address must start a new request.anna@company.test and click Check.Email confirmed status, then replace the value with anna+draft@company.test.Save button.anna@company.test and click Check again.Checking... state changes.The usual Angular commands are used for local runs:
npm install
npm test
Save must not remain available for a new value that has not yet been confirmed.Check must initiate a new check, even if the address matches the previous successful request.20.0.0, standalone components5.8.x7.8.xChangeDetectionStrategy.OnPushzone.jscheckEmail(email) returns Observable<{ email: string; available: boolean }>Use line comments to explain the problem, its impact, the fix and how to test it.