in Angular by (31.6k points)
Discuss the lifecycle designed for directive and components in Angular JS

1 Answer

0 votes
by (23.9k points)
Components and directive of Angular JS follow the following typical lifecycle.

nhOnInit

ngDoCheck

ngOnDestroy

Constructor

ngOnChanges

ngAfterContentInit (only for components)

ngAfterContentChecked (only for components)

ngAfterViewInit (only for components)

ngAfterViewChecked (only for components)

Related questions

0 votes
0 votes
asked Jan 15, 2020 in Angular by rahuljain1 (6.5k points)
...