question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support UTF in Angular expressions

See original GitHub issue

Currently the lexer in change detection uses StringWrapper.charCodeAt()

  • in Dart it returns s.codeUnitAt() which supports UTF
  • in JS it returns str.charCodeAt() which does not support UTF

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:9
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

9reactions
stephanrauhcommented, Dec 7, 2016

I’d like to see full UTF-8 support for properties in templates, too. Not every programmer speaks English, and as to my experience, it’s a good idea to use your native language for things like variable and method names. It helps to distinguish between your own entities and the entities defined by the framework. Usually, all the popular names are already reserved by frameworks 😃.

6reactions
pkozlowski-opensourcecommented, May 11, 2020

This issue is still relevant and it is confirmed bug in the latest version of Angular, see: https://stackblitz.com/edit/angular-ivy-nuc4uz?file=src/app/app.component.ts

tl;dr; is that it is all about making non-ASCII characters in Angular expressions:

@Component({
  selector: 'my-app',
  template: '<div>{{ 我的 }} </div>',
})
export class AppComponent  {
  // Chinese character
  我的 = 'Angular';
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Expressions - W3Schools
AngularJS expressions do not support conditionals, loops, and exceptions, while JavaScript expressions do. AngularJS expressions support filters, while ...
Read more >
How can I use special characters in angular directives ...
How can I use special characters in angular directives attributes? · javascript · angularjs · utf-8 · special-characters · directive.
Read more >
Upgrading from AngularJS to Angular
This is a module that contains utilities for bootstrapping and managing hybrid applications that support both Angular and AngularJS code. When you use...
Read more >
Top 40+ Angular Interview Questions and Answers for 2023
Angular supports four types of decorators, they are: ... Filters are used to format an expression and present it to the user.
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
Fortunately, ui-router supports that out of the box with absolute named view targeting. // A COMPLEX PRODUCT PAGE // WITH NO MORE TROUBLE...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found