Detecting Input Binding Changes

Learn how to detect the input binding changes using lifecycle hooks of the Angular component.

We'll cover the following

The OnChanges lifecycle hook is called when Angular detects that the value of an input data binding has changed. We will use it in the product detail component to learn how it behaves when we select a different product from the list:

  1. Import the OnChanges and SimpleChanges artifacts in the product-detail.component.ts file.

Get hands-on with 1400+ tech skills courses.