I have a generic mat-error directive that I’ve been using to show form errors.
export class FieldErrorComponent {
field = input.required<AbstractControl<any, any>>();
fieldName = input.required<string>();
}
And I show the errors on html side accordingly:
<span *ngIf="field().hasError('email')">
Invalid email address.
</span>
After trying zoneless with Angular18, this directive stopped working. I’ve migrated other components successfully using async pipes and signals accordingly, but in this case I am not sure how this component will get the input updates so that it can show the error messages.