When consuming a text token, the lexer tracks whether it is reading characters from inside an interpolation so that it can identify invalid ICU expressions. Inside an interpolation there will be no ICU expression so it is safe to have unmatched `{` characters, but outside an interpolation this is an error. Previously, if an interpolation was started, by an opening marker (e.g. `{{`) in a text token but the text came to an end before the closing marker (e.g. `}}`) then the lexer was not clearing its internal state that tracked that it was inside an interpolation. When the next text token was being consumed, the lexer, incorrectly thought it was already within an interpolation. This resulted in invalid ICU expression errors not being reported. For example, in the following snippet, the first text block has a prematurely ended interpolation, and the second text block contains an invalid `{` character. ``` <div>{{</div> <div>{</div> ``` Previously, the lexer would not have identified this as an error. Now there will be an EOF error that looks like: ``` TS-995002: Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ``` PR Close #42605
Angular - The modern web developer's platform.
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.
Contributing Guidelines
·
Submit an Issue
·
Blog
Documentation
Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.
Advanced
Development Setup
Prerequisites
- Install Node.js which includes Node Package Manager
Setting Up a Project
Install the Angular CLI globally:
npm install -g @angular/cli
Create workspace:
ng new [PROJECT NAME]
Run the application:
cd [PROJECT NAME]
ng serve
Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.
Quickstart
Ecosystem
Changelog
Learn about the latest improvements.
Upgrading
Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
Want to Help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Community
Join the conversation and help the community.
Love Angular? Give our repo a star ⭐ ⬆️.