-
Notifications
You must be signed in to change notification settings - Fork 27.1k
inputBinding doesn't mark OnPush components for check #62343
Copy link
Copy link
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtime
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Using inputBinding to bind to an old-style @Input() property of an OnPush component doesn't mark the component for check and therefore never updates the template of that component.
The input property's value is set correctly and ngOnChanges is called as expected.
If I use ChangeDetectionStrategy.Default or input signals, the template is updated as expected. But in my case I am dealing with components I cannot change so easily. I'm trying to migrate from ComponentRef#setInput and ng-dynamic-component to the new API.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/yssynzjl?file=src%2Fmain.ts
Please provide the exception or error you saw
OnPush component doesn't run change detection on input change.
Please provide the environment you discovered this bug in (run ng version)
Angular 20.0.5
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtime