mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
07d9a27da2
The `NgOnChanges` feature matches some legacy ViewEngine behavior where the keys in the `SimpleChanges` object are based on the *declared* names of the inputs, not the public or minified names. This is achieved by constructing the `DirectiveDef.declaredInputs` object at the same time as when `DirectiveDef.inputs` is created. This logic breaks down for host directives, because they can re-alias the input under a different public name which won't be present in the `declaredInputs`. These changes add some logic to patch the directive def aliases onto the `declaredInputs`. There is some validation in place to ensure that this patching doesn't overwrite any pre-existing inputs. PR Close #47597