How to detect when an @Input() value changes in Angular?

How to detect when an @Input() value changes in Angular?

Whenever the @ Input type property will be changed, the Angular change detector will start from the root component and traverse all child components to update the DOM. Any changes in the primitive type’s property will cause Angular change detection to detect the change and update the DOM.