angular/packages
Dylan Hunn 4b4dd2bf3a refactor(compiler): Don't emit properties on structural ng-templates (#51950)
Consider an `ng-template` which is generated as a result of a structural directive:

```
<div *ngFor="let inner of items"
             (click)="onClick(inner)"
             [title]="getTitle()"
             >
```

This should logically expand into something like the following:

```
<ng-template [ngForOf]="..." >
        <div (click)="..." [title]="..."></div>
</ng-template>
```

Note that the `(click)` handler and the `[title]` property are only present on the inner div, *not* on the enclosing generated `ng-template`.

Previously, Template Pipeline would place these bindings on *both* the tempate and the inner element.

However, we can't just remove them completely, because these bindings should still be matchable on the generated `ng-template` (which is very surprising, but nonetheless true).

We resolve this issue with two improvements:
(1) The ingestion step is now much smarter about determining not only if a binding is on a template element, but whether it actually targets that template element.
(2) We use `ExtractedAttributeOp` directly, rather than going through `BindingOp`, to cause the `ng-template` to still receive these bindings in its `consts` array for matching purposes.

PR Close #51950
2023-10-04 09:00:54 -07:00
..
animations test(animations): update the integration test (#50738) 2023-09-29 10:49:41 -07:00
bazel feat(core): enable block syntax (#51994) 2023-10-03 15:26:05 -07:00
benchpress docs: updated the benchpress readme doc (#51110) 2023-07-21 16:43:30 +00:00
common refactor(common): update NgTemplateOutlet to no longer rely on context swapping (#51887) 2023-10-04 08:14:35 -07:00
compiler refactor(compiler): Don't emit properties on structural ng-templates (#51950) 2023-10-04 09:00:54 -07:00
compiler-cli refactor(compiler): Don't emit properties on structural ng-templates (#51950) 2023-10-04 09:00:54 -07:00
core refactor(core): allow nested @defer block to contain the same dependency (#51964) 2023-10-04 09:00:23 -07:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements build: remove support for Node.js v16 (#51755) 2023-09-13 10:49:06 -07:00
examples build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
forms refactor(forms): Use the Writable type when overwriting readonly properties. (#49754) 2023-09-22 10:02:13 -07:00
language-service refactor(compiler): implement template type checking for loop blocks (#51690) 2023-09-20 11:26:05 +02:00
localize feat(core): implement new block syntax (#51891) 2023-09-26 09:10:04 -07:00
misc/angular-in-memory-web-api docs: update invalid links to the new http guides (#49456) 2023-06-22 17:06:59 -07:00
platform-browser feat(animations): Add the possibility of lazy loading animations code. (#50738) 2023-09-29 10:49:39 -07:00
platform-browser-dynamic build: remove support for Node.js v16 (#51755) 2023-09-13 10:49:06 -07:00
platform-server feat(core): enable block syntax (#51994) 2023-10-03 15:26:05 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router fix(router): Allow redirects after an absolute redirect (#51731) 2023-09-26 10:59:20 -07:00
service-worker fix(service-worker): throw a critical error when handleFetch fails (#51960) 2023-10-04 08:50:50 -07:00
upgrade build: remove support for Node.js v16 (#51755) 2023-09-13 10:49:06 -07:00
zone.js build: update cross-repo angular dependencies (#51996) 2023-10-03 08:07:48 -07:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -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
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 build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07: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