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
28 lines
984 B
Text
28 lines
984 B
Text
load("//tools:defaults.bzl", "pkg_npm")
|
|
|
|
exports_files([
|
|
"tsconfig.json",
|
|
"migrations.json",
|
|
"collection.json",
|
|
])
|
|
|
|
pkg_npm(
|
|
name = "npm_package",
|
|
srcs = [
|
|
"collection.json",
|
|
"migrations.json",
|
|
"package.json",
|
|
"//packages/core/schematics/ng-generate/control-flow-migration:static_files",
|
|
"//packages/core/schematics/ng-generate/standalone-migration:static_files",
|
|
],
|
|
validate = False,
|
|
visibility = ["//packages/core:__pkg__"],
|
|
deps = [
|
|
"//packages/core/schematics/migrations/block-template-entities:bundle",
|
|
"//packages/core/schematics/migrations/compiler-options:bundle",
|
|
"//packages/core/schematics/migrations/invalid-two-way-bindings:bundle",
|
|
"//packages/core/schematics/migrations/transfer-state:bundle",
|
|
"//packages/core/schematics/ng-generate/control-flow-migration:bundle",
|
|
"//packages/core/schematics/ng-generate/standalone-migration:bundle",
|
|
],
|
|
)
|