To capture changes in the @Input() property, one should implement the ______ interface.

  • AfterViewInit
  • OnChanges
  • OnDestroy
  • OnInit
To capture changes in the @Input() property, one should implement the OnChanges interface. The OnChanges lifecycle hook provides a method, ngOnChanges, which is called whenever any of the input properties of a component change. This allows you to react to input changes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *