231k views
2 votes
When is the ngOnChanges method invoked in Angular?

a) When the component is destroyed
b) When the component is first created
c) Every time there is a change in an input property
d) When the component is rendered

1 Answer

2 votes

Final answer:

The ngOnChanges method in Angular is invoked every time there is a change in an input property.

Step-by-step explanation:

The ngOnChanges method in Angular is invoked every time there is a change in an input property. This means that whenever there is a change in the values of the input properties of a component, the ngOnChanges method will be triggered. It allows you to perform certain actions or update the component's state based on the new values.

User Binpy
by
7.3k points