What properties should be in the ng-if below method is not called all the time?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
19 views
I use a reactive form in Angular and Angular Material.
I have the validation for uniqueness of the email in metode houldBeUnique() in which I appeal to the server.
What properties need to be in ng-if this method is not called all the time.
Email is shouldBeUnique
by | 19 views

1 Answer

0 like 0 dislike
Make a variable
_shouldBeUnique = false; shouldBeUnique(){ request() .subscribe(res=>(this._shouldBeUnique = res)) }

and the template already vvodite variable _shouldBeUnique
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 2, 2019 by coffeehoock
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users