angular/packages
Kristiyan Kostadinov d7a83f9521 fix(compiler-cli): avoid conflicts with built-in global variables in for loop blocks (#53319)
Currently we generate the following TCB for a `@for` loop:

```ts
// @for (item of items; track item) {...}

for (const item of this.items) {
  var _t1 = item;
  // Do things with `_t1`
}
```

This is problematic if the item name is the same as a global variable (e.g. `document`), because when the TCB has references to that variable (e.g. `document.createElement`), it'll find the loop initializer instead of the global variable.

These changes fix the issue by generating the following instead:

```ts
for (const _t1 of this.items) {
  // Do things with `_t1`
}
```

Fixes #53293.

PR Close #53319
2023-12-04 21:45:17 -08:00
..
animations fix(animations): prevent the AsyncAnimationRenderer from calling the delegate when there is no element. (#52570) 2023-11-13 16:29:18 +00:00
bazel feat(core): support TypeScript 5.3 (#52572) 2023-11-09 22:56:41 +00:00
benchpress test(core): clean up unnecessary nesting in old tests (#52239) 2023-10-19 09:26:15 -07:00
common refactor(core): replace runInContext by runInInjectionContext (#53035) 2023-11-20 12:05:00 -08:00
compiler test(compiler): Update golden partial file (#53327) 2023-12-04 14:24:21 -08:00
compiler-cli fix(compiler-cli): avoid conflicts with built-in global variables in for loop blocks (#53319) 2023-12-04 21:45:17 -08:00
core refactor(core): skip disconnected nodes while computing node path for hydration (#53317) 2023-12-04 21:44:08 -08:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
examples docs(forms): replace fb with formBuilder (#52261) 2023-10-19 09:24:39 -07:00
forms build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
language-service feat(core): support TypeScript 5.3 (#52572) 2023-11-09 22:56:41 +00:00
localize feat(core): support TypeScript 5.3 (#52572) 2023-11-09 22:56:41 +00:00
misc/angular-in-memory-web-api fix(http): Don't override the backend when using the InMemoryWebAPI (#52425) 2023-11-08 18:42:20 +00:00
platform-browser refactor(platform-browser): clean up legacy way of getting a relative path (#53097) 2023-11-27 10:59:53 +01:00
platform-browser-dynamic build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
platform-server refactor(core): skip disconnected nodes while computing node path for hydration (#53317) 2023-12-04 21:44:08 -08:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router Revert "fix(router): Ensure canMatch guards run on wildcard routes (#53239)" (#53339) 2023-12-03 14:57:54 -08:00
service-worker build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
upgrade build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
zone.js release: cut the zone.js-0.14.2 release (#52508) 2023-11-03 10:54:12 -07:00
BUILD.bazel build: add target to generate api manifest (#52472) 2023-11-02 11:00:59 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts
tsconfig-build.json build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json refactor(core): throw an error when hydration marker is missing from DOM (#51170) 2023-08-04 11:31:49 -04:00
tsconfig.json refactor(common): Add a new platform_navigation that provides the Navigation API. (#52363) 2023-11-09 18:01:33 +00:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

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