Lifecycle hooks A component instance has a lifecycle that starts when Angular instantiates the component class and renders the component view along with its child views. The lifecycle continues with change detection, as Angular checks to see when data-bound properties change, and updates both the view and the component instance as needed. The lifecycle ends when Angular destroys the component instance and removes its rendered template from the DOM . Directives have a similar lifecycle , as Angular creates , updates, and destroys instances in the course of execution. Your application can use lifecycle hook methods to tap into key events in the lifecycle of a component or directive in order to initialize new instances, initiate change detection when needed, respond to updates during change detection, and clean up before deletion of instances. - Study24x7
Social learning Network
6 followers study24x7 02 Mar 2021 04:06 PM study24x7 study24x7

Lifecycle hooks A component instance has a lifecycle that starts when Angular instantiates the component class and renders the component view along with its child views. The lifecycle continues with change detection, as Angular checks to see when data-bound properties cha...

See more

Lifecycle hooks
A component instance  has a  lifecycl...
study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles