mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
As a part of #54154, an old parser behavior came up where two-way bindings were parsed by appending `= $event` to the event side. This was problematic, because it allowed some non-writable expressions to be passed into two-way bindings. These changes introduce a migration that will change the two-way bindings into two separate input/output bindings that represent the old behavior so that in a future version we can throw a parser error for the invalid expressions. ```ts // Before @Component({ template: `<input [(ngModel)]="a && b"/>` }) export class MyComp {} // After @Component({ template: `<input [ngModel]="a && b" (ngModelChange)="a && (b = $event)"/>` }) export class MyComp {} ``` PR Close #54630 |
||
|---|---|---|
| .. | ||
| google3 | ||
| all-migrations.spec.ts | ||
| block_template_entities_spec.ts | ||
| BUILD.bazel | ||
| compiler_options_spec.ts | ||
| control_flow_migration_spec.ts | ||
| helpers.ts | ||
| invalid_two_way_bindings_spec.ts | ||
| project_tsconfig_paths_spec.ts | ||
| standalone_migration_spec.ts | ||
| transfer_state_spec.ts | ||