New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control flow - template used in multiple else clauses #52854
Comments
One more thing to consider, when template is used in both @if (hasPermission) {
<div>presentation</div>
} @else {
<div>Imagine more than just some text</div>
}
<ng-container *ngTemplateOutlet="noPermission"></ng-container>
<ng-template #noPermission>
<div>Imagine more than just some text</div>
</ng-template> |
This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly. fixes: angular#52854
Thanks for reporting this! There's a fix in #52863. |
angular#52863) This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly. fixes: angular#52854 PR Close angular#52863
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
angular#52863) This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly. fixes: angular#52854 PR Close angular#52863
angular#52863) This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly. fixes: angular#52854 PR Close angular#52863
angular#52863) This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly. fixes: angular#52854 PR Close angular#52863
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
When the same template is used in multiple
*ngIf
else
clauses then te code is incorectly migratedProposed solution
<ng-container *ngTemplateOutlet="noPermission">
and leave<ng-template #noPermission>
Alternatives considered
Not sure which is better so mayby allow for interactive migration and let user decide? Or at least flag for user preference.
The text was updated successfully, but these errors were encountered: