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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$onChanges isn't called on the initialization of the component.
What is the motivation / use case for changing the behavior?
The motivation is to match the behavior of Angular 2. In A2, ngOnChanges is called on the initialization of the component too. And the change object includes the isFirstChange method, which in this case returns true.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Do you want to request a feature or report a bug?
Feature (I guess)
What is the current behavior?
$onChangesisn't called on the initialization of the component.What is the motivation / use case for changing the behavior?
The motivation is to match the behavior of Angular 2. In A2,
ngOnChangesis called on the initialization of the component too. And the change object includes theisFirstChangemethod, which in this case returnstrue.Other information (e.g. stacktraces, related issues, suggestions how to fix)
A plunk that shows how
ngOnChangesworks in Angular 2: http://plnkr.co/edit/kIf8QgrFxtENzvr6V5TZ?p=preview