-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationscore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)state: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
@angular/core
Is this a regression?
No, never worked right when the template have specific Greek characters
Description
When the template has specific Greek characters in it, the control-flow migration fails consistently; migration done with ng generate @angular/core:control-flow.
Code that reproduces the error:
<ng-container *ngIf="(application$ | async) as application">
<div class="alert alert-info my-4" role="alert">
<p class="mb-0">
Δοκιμή με ελληνικούς χαρακτήρες. θ δ
</p>
</div>
</ng-container>is migrated to:
@if ((application$ | async); as application) {
<div class="alert alert-info my-4" role="alert">
<p class="mb-0">
Δοκιμή με ελληνικούς χαρακτήρες. <ng-template [ngTemplateOutlet]=" "></ng-template>
</p>
</div>
}AFAICT the Greek characters θ and δ confuse the migration.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No exception when running the update command, but the generated template changes produce broken code which breaks compilation:
- Changes detected. Rebuilding...
Application bundle generation failed. [0.720 seconds]
✘ [ERROR] NG2: Type 'undefined' is not assignable to type 'TemplateRef<any> | null'. [plugin angular-compiler]
src/app/components/submission/submission.component.html:4:53:
4 │ ...�ηνικούς χαρακτήρες. <ng-template [ngTemplateOu...
╵ ~~~~~~~~~~
Error occurs in the template of component SubmissionComponent.
src/app/components/submission/submission.component.ts:35:15:
35 │ templateUrl: './submission.component.html'
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please provide the environment you discovered this bug in (run ng version)
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.3.2
Node: 20.12.0
Package Manager: npm 10.5.0
OS: linux x64
Angular: 17.3.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.2
@angular-devkit/build-angular 17.3.2
@angular-devkit/core 17.3.2
@angular-devkit/schematics 17.3.2
@angular/cli 17.3.2
@schematics/angular 17.3.2
rxjs 7.8.1
typescript 5.4.3
zone.js 0.14.4
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationscore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)state: has PR