Suggest an editImprove this articleRefine the answer for “What is the component lifecycle in Angular?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)In Angular, the **component lifecycle** is the sequence of stages from component creation to its destruction, during which Angular calls special lifecycle hook methods to manage state and resources. **Key point:** the component lifecycle is a controlled Angular process of creating, updating, and destroying a component, which allows managing logic and resources at every stage.Shown above the full answer for quick recall.Answer (EN)ImageIn Angular, the **component lifecycle** is the sequence of stages from **component creation to its destruction**, during which Angular calls special lifecycle hook methods to manage state and resources. ## Key points 1. **Component creation** - Angular creates an instance of the component class and injects dependencies through the constructor (`constructor`). - At this stage there is still no access to the DOM elements of the template. 2. **Initialization (**`OnInit`**)** - The `ngOnInit()` method is called after the input data (`@Input`) is bound and the template is prepared. - Used to initialize logic, load data, and set up the initial state. 3. **Update (**`OnChanges`**,** `DoCheck`**,** `AfterViewInit`**)** - `ngOnChanges(changes)` - called when the input data (`@Input`) changes. - `ngDoCheck()` - a custom change check, used when a more precise reaction to changes is needed. - `ngAfterViewInit()` - called after the child components and DOM elements are initialized. 4. **View update** - `ngAfterViewChecked()` - called after each change check in the component and its child components. 5. **Destruction (**`OnDestroy`**)** - The `ngOnDestroy()` method is called before the component is removed from the DOM. - Used to clean up resources, unsubscribe from subscriptions, timers, and events. In other words, the component lifecycle is a **controlled Angular process of creating, updating, and destroying a component**, which allows managing logic and resources at every stage.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.