Which lifecycle hook is called when an input property changes?

  1. ngOnInit
  2. ngDoCheck
  3. ngOnChanges
  4. ngAfterViewInit
Correct answer ngOnChanges

Explanation

ngOnChanges reacts to @Input() changes.

Update: Admin added a tag on this question

Topics

By Admin · · 26 views