Jun 1, 2021
Thanks,
Please make sure that you have wrote the formControlName correctly and if you are sure that the object refrence you are passing to 'mat-error' is not null but the error consist, you can use the following syntax to tell Angular that you are aware of it and it is not null:
registerForm.get('email')!.hasError('required')
mind the ! after form.get()