Answer the question
In order to leave comments, you need to log in
What properties should be in ng-if so that the method is not called all the time?
I am using reactive forms in Angular and Angular Material.
I have a mail uniqueness check in the shouldBeUnique() method in which I call the server.
What properties should be in ng-if so that this method is not called all the time.
<mat-error *ngIf="email.valid && email.touched">
<mat-error *ngIf="shouldBeUnique()">Email is shouldBeUnique</mat-error>
</mat-error>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question