mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
e40a4fa3c7
`@angular/upgrade` writes to inputs when downgrading an Angular 2+ component into an Angular.JS adapter. Previously, it wrote directly to the input property, which isn't compatible with input signals. It also handles `ngOnChanges` directly. The correct way to support input signals would be to refactor upgrade to use `ComponentRef.setInput`, which also handles `ngOnChanges` internally. However, this refactoring might be more breaking since it would change the timing of certain operations. Instead, this commit updates the code to recognize `InputSignal` and write it through the `InputSignalNode`. This avoids the above breaking changes for now, until a bigger refactoring can be tested. Fixes #56860. PR Close #57020