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 |
||
|---|---|---|
| .. | ||
| block-template-entities | ||
| compiler-options | ||
| google3 | ||
| invalid-two-way-bindings | ||
| transfer-state | ||