O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The life cycle of a component

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required