-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerstate: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
No
Description
In Angular 19.2 template literals are allowed in template files but when using with @let or track this causes a build error.
There are surely other cases that I have not noticed.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/sb1-uvh8sdq9?file=src%2Fmain.ts,src%2Ftemplate.html
Please provide the exception or error you saw
✘ [ERROR] Angular compilation emit failed. [plugin angular-compiler]
Error: Debug Failure. Invalid raw text
at checkTemplateLiteralLikeNode (/home/projects/sb1-uvh8sdq9/node_modules/typescript/lib/typescript.js:26263:22)
at Object.createNoSubstitutionTemplateLiteral (/home/projects/sb1-uvh8sdq9/node_modules/typescript/lib/typescript.js:26318:12)
at TypeScriptAstFactory.createTemplateLiteral (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:3129:53)
at ExpressionTranslatorVisitor.visitTemplateLiteralExpr (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2500:48)
at TemplateLiteralExpr.visitExpression (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler/fesm2022/compiler.mjs:1545:24)
at ExpressionTranslatorVisitor.visitExpressionStmt (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2466:81)
at ExpressionStatement.visitStatement (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler/fesm2022/compiler.mjs:2180:24)
at eval (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2635:42)
at ExpressionTranslatorVisitor.visitStatements (file:///home/projects/sb1-uvh8sdq9/node_modules/@angular/compiler-cli/bundles/chunk-KOIBHR3X.js:2635:23)
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 19.2.4
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64
Angular: 19.2.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1902.4
@angular-devkit/core 19.2.4
@angular-devkit/schematics 19.2.4
@angular/build 19.2.4
@angular/cli 19.2.4
@schematics/angular 19.2.4
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else?
No response
reduckted and Julien-Marcou
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerstate: has PR