angular/packages/core/schematics/migrations
Kristiyan Kostadinov fb540e169a feat(core): add migration for invalid two-way bindings (#54630)
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
2024-02-28 18:06:23 +01:00
..
block-template-entities fix(migrations): handle nested classes in block entities migration (#52309) 2023-10-24 14:34:16 -07:00
compiler-options feat(migrations): schematic to remove deprecated CompilerOptions properties (#49672) 2023-10-10 09:35:55 -07:00
google3 fix(core): Remove no longer needed build rule related to removed migration (#52143) 2023-10-10 10:40:39 -07:00
invalid-two-way-bindings feat(core): add migration for invalid two-way bindings (#54630) 2024-02-28 18:06:23 +01:00
transfer-state feat(migrations): Schematics for TransferState, StateKey and makeStateKey migration. (#49594) 2023-10-10 13:12:36 -07:00