What it does
Lifecycle hook that is called when any data-bound property of a directive changes.
How to use
.
Class Overview
Class Description
ngOnChanges
is called right after the data-bound properties have been checked and before view
and content children are checked if at least one of them has changed.
The changes
parameter contains the changed properties.
exported from @angular/core/index, defined in @angular/core/src/metadata/lifecycle_hooks.ts