Suggest an editImprove this articleRefine the answer for “Which lifecycle hooks do directives support?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Directives in Angular support almost the same **lifecycle hooks** as components, except for a few related to the view template (since a directive has no template of its own). **Key point:** directives have almost the full set of component lifecycle hooks, except for the view-related hooks (`ngAfterViewInit`, `ngAfterViewChecked`), which apply only to components.Shown above the full answer for quick recall.Answer (EN)ImageDirectives in Angular support almost the same **lifecycle hooks** as components, except for a few related to the view template (since a directive has no template of its own). ## Main hooks for directives 1. `ngOnChanges(changes)` - called when input properties change (`@Input`). 2. `ngOnInit()` - called once after the first initialization of input properties. 3. `ngDoCheck()` - called on every change detection cycle. 4. `ngAfterContentInit()` - called after content is inserted (`<ng-content>`), if the directive is used on a component with content projection. 5. `ngAfterContentChecked()` - called after every check of the inserted content. 6. `ngOnDestroy()` - called before the directive is removed from the element, to clean up resources and unsubscribe from events. > Conclusion: directives have almost the full set of component lifecycle hooks, but **the view-related hooks (**`ngAfterViewInit`**,** `ngAfterViewChecked`**)** apply only to components, since a directive has no template of its own.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.