angular-docs-cn/packages
Paul Gschwendtner 3c726c3516 fix(compiler): unclear lexer error when using private identifier in expressions (#42027)
TypeScript supports ECMAScript private identifiers. It can happen that
developers intend to access such members from within an expression.

This currently results in an unclear error from the lexer. e.g.

```
'Parser Error: Unexpected token # at column 1 in [{{#myField}}] in C:/test.ts@5:2
```

We could improve such errors by tokenizing private identifiers similar to
how the TypeScript scanner processes them. Later we can report better
errors in the expression parser or in the typecheck block. This commit
causes all private identifier tokens to be disallowed, so it never
reaches the type checker. This is done intentionally as private
identifiers should not be considered valid Angular syntax, especially
because private fields are not guaranteed to be accessible from within
a component/directive definition (e.g. there cases where a template
function is generated outside of the class; which results in private
members not being accessible; and this results in mixed/confusing
behavior).

Fixes #36003.

PR Close #42027
2021-05-18 10:15:12 -07:00
..
animations Revert "refactor(core): optimize calls to `split` and `slice` while computing version parts (#41208)" 2021-05-12 14:13:50 -04:00
bazel fix(bazel): update supported range of node versions to only include LTS versions (#41822) 2021-04-26 15:21:13 -07:00
benchpress docs(benchpress): reword a comment (#42096) 2021-05-14 21:09:02 +00:00
common feat(common): add URLSearchParams to request body (#37852) 2021-05-07 10:45:02 -04:00
compiler fix(compiler): unclear lexer error when using private identifier in expressions (#42027) 2021-05-18 10:15:12 -07:00
compiler-cli refactor(compiler-cli): remove redundant `potentialSourceMapUrl` property (#42000) 2021-05-10 10:33:27 -04:00
core fix(core): global listeners not being bound on non-node host elements (#42014) 2021-05-14 14:51:04 +00:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
examples docs: update examples to use correct `Injector.create()` overload (#42006) 2021-05-17 10:53:28 -07:00
forms fix(forms): registerOnValidatorChange should be called for ngModelGroup. (#41971) 2021-05-13 13:57:47 -04:00
language-service fix(language-service): fully de-duplicate reference and rename results (#40523) 2021-05-06 17:54:14 -04:00
localize build: update all non-major dependencies (#41956) 2021-05-10 11:35:59 -04:00
misc/angular-in-memory-web-api build: remove `core-js` in favor of `core-js-bundle` (#41739) 2021-04-26 09:29:58 -07:00
platform-browser fix(platform-browser): prevent memory leak of style nodes if shadow DOM encapsulation is used (#42005) 2021-05-10 16:12:19 -04:00
platform-browser-dynamic test: refactor test to work with latest @types/jasmine (#41956) 2021-05-10 11:36:00 -04:00
platform-server docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
private/testing build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
router docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
service-worker fix(service-worker): update supported range of node versions to only include LTS versions (#41822) 2021-04-26 15:21:13 -07:00
upgrade docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
zone.js build: update dependency google-closure-compiler to v20210505 (#41980) 2021-05-13 13:32:54 -04:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json build: exclude compiler compliance tests from Saucelabs tests (#41866) 2021-04-30 14:15:10 -07:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT