Angular manages the life cycle of a component. Angular takes care of creating and rendering the components and their children and destroying them before removing them from the DOM. Angular keeps track of the value of the component property value. The following are the life cycle events of an Angular component given in calling order:
- OnChanges: This event is fired when a binding values changes. This method will have access to both the old value and the new value.
- OnInit: This event is fired after the execution of the OnChanges event due to binding value changes.
- DoCheck: This event is fired for every change detected, and developers can write custom logic to check for the property changed.
- AfterContentInit: This ...