the following example, here:
https://material.angular.io/components/input/overview
located under Custom Error Matcher contains one too many right brackets
and on top of that, is unclear:
functionmyErrorStateMatcher(control: FormControl,form: FormGroupDirective|NgForm): boolean{// Error when invalid control is dirty, touched, or submittedconst isSubmitted =form&&form.submitted;return!!(control.invalid&&(control.dirty||control.touched||isSubmitted)));}why not just use:
return control.invalid && (control.dirty || control.touched || isSubmitted);
?
the following example, here:
https://material.angular.io/components/input/overview
located under Custom Error Matcher contains one too many right brackets
and on top of that, is unclear:
why not just use:
?