Use the ngOnChanges() lifecycle method in your component.
> 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.
Some like this
@Input() object: string;
ngOnChanges(changes: SimpleChanges) {
console.log(changes.object.currentValue);
// You can also use object.previousValue and
// object.firstChange for comparing old and new values
}
Use the `ngOnChanges()` lifecycle method in your component.
> 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.
Here are the [Docs][1].
[1]: https://angular.io/docs/ts/latest/api/core/index/OnChanges-class.html