You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular Material Form Unexpected Behavior After Control Flow Migration #52277
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
After running the new control flow migration ng generate @angular/core:control-flow , we encountered unexpected behavior with an Angular Material form component.
Please provide a link to a minimal reproduction of the bug
Capturing what we talked about with @pkozlowski-opensource over DM: the root cause is that mat-form-field has an <ng-content select="mat-error"/> while at the same time requiring ngIf/@if on mat-error in order to trigger the animation. With the new control flow there's currently no way to project mat-error into the correct slot.
Reacted by Swami Sanapathi
Reacted by Enea Jahollari, Ion Prodan, nifiro and Heo
Activity
swami-sanapathi commentedon Oct 19, 2023
Before Migration:


After Migration:


swami-sanapathi commentedon Oct 19, 2023
Have attached minimal angular project also, just run the migration.
crisbeto commentedon Oct 19, 2023
Capturing what we talked about with @pkozlowski-opensource over DM: the root cause is that
mat-form-fieldhas an<ng-content select="mat-error"/>while at the same time requiringngIf/@ifonmat-errorin order to trigger the animation. With the new control flow there's currently no way to projectmat-errorinto the correct slot.fix(compiler): project control flow root elements into correct slot (#…
angular-automatic-lock-bot commentedon Dec 1, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(compiler): project control flow root elements into correct slot (a…