124k views
4 votes
What does the first parameter of `ngOnChanges()` typically contain?

a) Input property names
b) Output property names
c) SimpleChanges
d) ViewContainerRef

1 Answer

7 votes

Final answer:

The first parameter of ngOnChanges() typically contains SimpleChanges. ngOnChanges() is a lifecycle method in Angular that is called whenever there is a change in input properties in a component.

Step-by-step explanation:

The first parameter of ngOnChanges() typically contains SimpleChanges.

ngOnChanges() is a lifecycle method in Angular that is called whenever there is a change in input properties in a component. The SimpleChanges object contains metadata about each of the changed properties, including previous and current values. It allows the component to react to the changes and perform any necessary actions.

User Tanzila
by
8.7k points