angular/packages/core/schematics
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
..
migrations feat(core): add migration for invalid two-way bindings (#54630) 2024-02-28 18:06:23 +01:00
ng-generate fix(migrations): resolve infinite loop for a single line element with a long tag name and angle bracket on a new line (#54588) 2024-02-23 11:40:27 -08:00
test feat(core): add migration for invalid two-way bindings (#54630) 2024-02-28 18:06:23 +01:00
utils feat(migrations): Schematics for TransferState, StateKey and makeStateKey migration. (#49594) 2023-10-10 13:12:36 -07:00
BUILD.bazel feat(core): add migration for invalid two-way bindings (#54630) 2024-02-28 18:06:23 +01:00
collection.json feat(core): Add schematic to migrate control flow syntax (#52035) 2023-10-10 11:33:00 -07:00
migrations.json feat(core): add migration for invalid two-way bindings (#54630) 2024-02-28 18:06:23 +01:00
package.json refactor(migrations): ensure CommonJS migrations can be accessed (#43657) 2021-10-04 16:24:48 -07:00
tsconfig.json build: align schematics tsconfig with rest of the project (#51969) 2023-10-04 07:28:41 -07:00