1a0ee18d62
This commit fixes a compatibility bug where pre-order lifecycle hooks (onInit, doCheck, OnChanges) for directives on the same host node were executed based on the order the directives were matched, rather than the order the directives were instantiated (i.e. injection order). This discrepancy can cause issues with forms, where it is common to inject NgControl and try to extract its control property in ngOnInit. As the NgControl directive is injected, it should be instantiated before the control value accessor directive (and thus its hooks should run first). This ensures that the NgControl ngOnInit can set up the form control before the ngOnInit for the control value accessor tries to access it. Closes #32522 PR Close #34026 |
||
---|---|---|
.. | ||
BUILD.bazel | ||
directives_spec.ts | ||
form_array_spec.ts | ||
form_builder_spec.ts | ||
form_control_spec.ts | ||
form_group_spec.ts | ||
reactive_integration_spec.ts | ||
spies.ts | ||
template_integration_spec.ts | ||
validators_spec.ts | ||
value_accessor_integration_spec.ts |