angular-i18n breaks at runtime instead of buildtime when you migrate to new control flow and keep ng-container #60899
Labels
area: i18n
Issues related to localization and internationalization
Milestone
Which @angular/* package(s) are the source of the bug?
localize
Is this a regression?
Yes
Description
Note: I do not know if this is a regression or has been there forever.
We recently started migrating our Angular project at work over to the
new control-flow syntax (@if and @for) using the provided angular
migration for it.
This migrated a few of our pieces of code that looked like this:
To look like this:
This correctly breaks at build-time/when you try to ng-serve your
application as the content of @@some-key no longer is the same, the
placeholders changed from START_NG_CONTAINER etc. to START_BLOCK_IF etc. .
Not understanding the problem, we just added ng-container back in the
hope that this alleviates the problem:
This incorrectly will run with ng-serve despite the fact that the
content of @@some-key still changed, as START_BLOCK_IF were added to the
contents!
What you instead will see are runtime errors of various ilks about how
Nodes can't be inserted into the DOM, expressed through various different exceptions depending on the scenario.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: