Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
For example for the code like the one mentioned below:
<div *ngIf="pageNotFound && !isLoading; else pageContents" class="mat-card">
<h1>Page Not Found</h1>
<p>Sorry! The page you are looking for does't not exist, either it has been deactivate or removed.</p>
</p>
</div>
<ng-template #pageContents>
</ng-template>
The generated output is :
@if (pageNotFound && !isLoading) {
<div class="mat-card">
<h1>Company Profile Not Found</h1>
<p>Sorry! The profile you are looking for does't not exist, either it has been deactivate or removed.</p>
</div>
} @else {
The code which was inside the ng-template is placed here (without any changes).
}
<ng-template #pageContents>
The code with the new control flow remains here inside ng-template. It should have been placed inside the above else statement, and this ng-template block should have been removed.
</ng-template>
Please provide a link to a minimal reproduction of the bug
For this I can add you to a private repo
Please provide the exception or error you saw
No exception, is show because generated code is till valid. But migrations is not performed properly.
Please provide the environment you discovered this bug in (run ng version)
Anything else?
No response
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
For example for the code like the one mentioned below:
The generated output is :
Please provide a link to a minimal reproduction of the bug
For this I can add you to a private repo
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version)Anything else?
No response