I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
No error for this template:
<form [formGroup]="formGroup">
<mat-form-field>
<mat-label>Name</mat-label>
<input matInput formControlName="name" [controlErrorAnchor]="nameError" />
<mat-error><ng-template controlErrorAnchor #nameError="controlErrorAnchor"></ng-template></mat-error>
</mat-form-field>
</form>
Expected behavior
Error for the template above, as there's no errorTailor hosted in <form>.
What is the motivation / use case for changing the behavior?
Currently if we try to use the directive controlErrorAnchor (also in others, but I just tested with controlErrorAnchor) without form, for example, we get no error and it lead us for a difficult debug caused due to a silly mistake. I want to propose a check (probably only in devMode) in this "children" directives in order to avoid losing time with this.
Environment
I'm submitting a...
Current behavior
No error for this template:
Expected behavior
Error for the template above, as there's no
errorTailorhosted in<form>.What is the motivation / use case for changing the behavior?
Currently if we try to use the directive
controlErrorAnchor(also in others, but I just tested withcontrolErrorAnchor) withoutform, for example, we get no error and it lead us for a difficult debug caused due to a silly mistake. I want to propose a check (probably only indevMode) in this "children" directives in order to avoid losing time with this.Environment