Angular lifecycle hooks

I am drawing a sketch that represents the lifecycle flow of a component

using sketch.io

after the completion of the documents about the life cycle hukah
I came up with this sketch. Now is this the correct order of the lifecycle hooks in the component?enter image description here

+5


source to share


3 answers


This is what I understand from the Angular.io doc . This might help you. Angular life cycle hooks [3]



+7


source


ngOnChanges()

not called after constructor

, it is called after change detection starts and change detection is updated @Input()

.
Also called ngDoCheck()

when change detection is in progress.
ngOnInit()

called after being ngOnChanges()

called the first time.



See also https://angular.io/guide/lifecycle-hooks

+1


source


0


source







All Articles