You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Given a 3rd-party component that correctly uses OnPush change detection (since it only renders based on inputs), if you try to communicate with that 3rd-party component using ngModel and a ControlValueAccessor, the component fails to respond to change detection and never triggers the ngOnChanges() life-cycle method.
Expected behavior
When the ControlValueAccessor writes to the 3rd-party component's inputs, it should trigger change detection and the ngOnChanges() life-cycle method. This way, 3rd-party components that you do not have ownership over can be integrated into an ngModel control-flow.
In the demo, you'll see that the two components cannot stay in sync. This is because the first one uses input and the second one uses ngModel.
What is the motivation / use case for changing the behavior?
I believe this is a bug that inhibits the ability to consume components that you did not write yourself.
Please tell us about your environment:
Chrome on Plunkr.
Angular version: 2.0.X
This is with whatever Plunkr is currently using for @angular.
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome and Firefox.
Language: [all]
Node (for AoT issues):node --version =
The text was updated successfully, but these errors were encountered:
I'm submitting a ... (check one with "x")
Current behavior
Given a 3rd-party component that correctly uses OnPush change detection (since it only renders based on inputs), if you try to communicate with that 3rd-party component using ngModel and a ControlValueAccessor, the component fails to respond to change detection and never triggers the ngOnChanges() life-cycle method.
Expected behavior
When the ControlValueAccessor writes to the 3rd-party component's inputs, it should trigger change detection and the ngOnChanges() life-cycle method. This way, 3rd-party components that you do not have ownership over can be integrated into an ngModel control-flow.
Minimal reproduction of the problem with instructions
Plunkr: https://plnkr.co/edit/oS1qWN7x7nXlQ4oNwR5j?p=preview
In the demo, you'll see that the two components cannot stay in sync. This is because the first one uses input and the second one uses ngModel.
What is the motivation / use case for changing the behavior?
I believe this is a bug that inhibits the ability to consume components that you did not write yourself.
Please tell us about your environment:
Chrome on Plunkr.
Angular version: 2.0.X
This is with whatever Plunkr is currently using for @angular.
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome and Firefox.
Language: [all]
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: