angular/packages/compiler-cli/test/compliance/test_cases
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
..
r3_compiler_compliance perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler refactor(compiler): Fix a bug in which temporaries were being declared in the wrong places (#51950) 2023-10-04 09:00:54 -07:00
r3_view_compiler_bindings refactor(compiler): Emit pure functions as arrow functions (#51961) 2023-10-02 16:58:03 -07:00
r3_view_compiler_control_flow feat(core): enable block syntax (#51994) 2023-10-03 15:26:05 -07:00
r3_view_compiler_deferred refactor(compiler): Implement basic support for defer in Template Pipeline (#51942) 2023-10-03 19:40:04 -07:00
r3_view_compiler_di/di perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler_directives perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler_i18n perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler_input_outputs fix(compiler-cli): enforce a minimum version to be used when a library uses input transform (#51413) 2023-08-18 07:58:53 -07:00
r3_view_compiler_listener refactor(compiler): Enable some additional passing tests for template pipeline (#51544) 2023-09-19 12:05:47 +02:00
r3_view_compiler_providers fix(compiler-cli): libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50714) 2023-06-14 16:27:59 +02:00
r3_view_compiler_styling refactor(compiler): Drop !important when parsing host style/class bindings (#51950) 2023-10-04 09:00:54 -07:00
r3_view_compiler_template refactor(compiler): Don't emit properties on structural ng-templates (#51950) 2023-10-04 09:00:54 -07:00
source_mapping perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
BUILD.bazel test: refactor compiler-cli compliance test to work on windows (#45431) 2022-03-25 12:18:34 -07:00
list_golden_update_rules.ts refactor(compiler-cli): use semver range checking for partial versions (#39847) 2020-12-04 10:26:17 -08:00
test_case_schema.json test(compiler): allow alternate expected file for template pipeline (#51100) 2023-08-01 13:45:34 -07:00