mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Currently each property binding generates an instruction like this:
```
property('prop1', ctx.value1);
property('prop2', ctx.value2);
```
The problem is that we're repeating the call to `property` for each of the properties. Since the `property` instruction returns itself, we can chain all of the calls which is more compact and it looks like this:
```
property('prop1', ctx.value1)('prop2', ctx.value2);
```
These changes implement the chaining behavior for regular property bindings and for synthetic ones, however interpolated ones are still handled like before, because they use a separate instruction.
This PR resolves FW-1389.
PR Close #31078
|
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| mock_compile.ts | ||
| mock_compiler_spec.ts | ||
| r3_compiler_compliance_spec.ts | ||
| r3_view_compiler_binding_spec.ts | ||
| r3_view_compiler_di_spec.ts | ||
| r3_view_compiler_directives_spec.ts | ||
| r3_view_compiler_i18n_spec.ts | ||
| r3_view_compiler_input_outputs_spec.ts | ||
| r3_view_compiler_listener_spec.ts | ||
| r3_view_compiler_providers_spec.ts | ||
| r3_view_compiler_spec.ts | ||
| r3_view_compiler_styling_spec.ts | ||
| r3_view_compiler_template_spec.ts | ||
| README.md | ||
Tests in this directory should be run with:
yarn bazel test --define=compile=aot packages/compiler-cli/test/compliance:compliance