8000 Using {{}} interpolation in an expression causes toUpperCase error · Issue #27740 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

Using {{}} interpolation in an expression causes toUpperCase error #27740

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

Closed
alxhub opened this issue Dec 18, 2018 · 3 comments
Closed

Using {{}} interpolation in an expression causes toUpperCase error #27740

alxhub opened this issue Dec 18, 2018 · 3 comments
Labels
area: compiler Issues related to `ngc`, Angular's template compiler compiler: parser freq1: low P4 A relatively minor issue that is not relevant to core functions state: confirmed state: has PR type: bug/fix
Milestone

Comments

@alxhub
Copy link
Member
alxhub commented Dec 18, 2018

Accidental use of interpolation expressions inside an existing expression context results in a strange error.

Example:

<div *ngIf="name && {{name}}"></div>

results in:

Template parse errors:
TypeError: Cannot read property 'toUpperCase' of undefined ("<div [ERROR ->]*ngIf="name && {{name}}">

Live example here: https://stackblitz.com/edit/touppercase-of-undefined?file=src/app/app.component.html

Instead of throwing a more useful syntax error, we crash (probably in the attempt to throw the useful error).

@ngbot ngbot bot modified the milestone: Backlog Dec 18, 2018
@pkozlowski-opensource pkozlowski-opensource added state: has PR area: compiler Issues related to `ngc`, Angular's template compiler and removed area: core Issues related to the framework runtime labels Feb 18, 2020
@jelbourn jelbourn added P4 A relatively minor issue that is not relevant to core functions and removed severity1: confusing labels Oct 1, 2020
@petebacondarwin
Copy link
Contributor

This is being tracked in the aggregate issue of #43485 for which we need to create a project proposal.

@JoostK
Copy link
Member
JoostK commented May 26, 2022

Fixed in #30300

@JoostK JoostK closed this as completed May 26, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler compiler: parser freq1: low P4 A relatively minor issue that is not relevant to core functions state: confirmed state: has PR type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
0