Add change detection strategy for directives
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
While directives are template-less components, they still register the same life cycle.
Components with multiple directives in their templates have mixed change detection strategies. The components use OnPush while the directives use the default one and increase the change detection time.
This is another try to start a new vote for this feature: https://github.com/angular/angular/issues/19098
Proposed solution
Add change detection strategy for directives to support onPush.
Alternatives considered
Not using directives.
It is not clear from this proposal what the OnPush change detection strategy should do. Directives logic has many aspects (input bindings, host bindings, lifecycle hooks, ...) and it would require much more details for this to be a viable proposal.
More importantly, though - we should clearly define the problem that we are trying to tackle here. Could you please share real-life use-cases where a mechanism similar to OnPush would be beneficial for directives?
We haven't heard back with more info so I'm going to close this issue for now. Happy to reopen when more info surfaces.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.