Content-Length: 276741 | pFad | http://github.com/angular/angular/issues/61823

E7 A parsing error occurs when using quotes in nested template literals · Issue #61823 · angular/angular · GitHub
Skip to content

A parsing error occurs when using quotes in nested template literals #61823

Open
@g-drouard

Description

@g-drouard

Which @angular/* package(s) are the source of the bug?

compiler

Is this a regression?

No

Description

When using quotes in nested template literal there are several bugs :

With {{ }} :

  • If there is an odd number simple quote ' or double quote " it display source code (example: {{ `${`test with odd 'simple quote' ' `}` }})

With @let :

  • If there is an odd number simple quote ' or double quote " it triggers a parsing error
  • If there is a escaped back quote \` it triggers a parsing error

I haven't done any further testing. I imagine this causes other errors.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-8tr8q3bf?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fmain.ts,src%2Fapp.html&template=node&title=Angular%20Starter

Please provide the exception or error you saw

`NG5002: Unexpected character "EOF" [plugin angular-compiler]`

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.0.0
Node: 20.19.1
Package Manager: npm 10.8.2
OS: linux x64

Angular: 20.0.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.0
@angular-devkit/core         20.0.0
@angular-devkit/schematics   20.0.0
@schematics/angular          20.0.0
rxjs                         7.8.2
typescript                   5.8.2
zone.js                      0.15.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/angular/angular/issues/61823

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy