From a2a388bb1a728d142476660f3f9024fc45230a2c Mon Sep 17 00:00:00 2001 From: Priti Baban Nandankar <30861220+PritiNandankar@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:15:16 +0530 Subject: [PATCH] Update angular.md Added Lifecycle Hooks of Component --- angular.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/angular.md b/angular.md index 83673c0..43bc4a4 100644 --- a/angular.md +++ b/angular.md @@ -67,6 +67,40 @@ Angular is an application-design framework and development platform for creating ``` + +#### Angular Lifecycle Hooks: +- ngOnInit() + ``` + It get invoked when angular initialize component or directive. + ``` +- ngOnChanges() + ``` + It get invoked when angular sets data bound input property i.e. @Input(). + ``` +- ngDoCheck() + ``` + It get invoked for every changes. + ``` +- ngAfterContentInit() + ``` + It get invoked after angular project content in its view. + ``` +- ngAfterContentChecked() + ``` + It get invoked after angular checks the binding of content into view. + ``` +- ngAfterViewInit() + ``` + It get invoked after angular create component view. + ``` +- ngAfterViewChecked() + ``` + It get invoked after angular checks the binding of component view. + ``` +- ngOnDestroy() + ``` + It get invoked before angular destroy component or directives. + ``` #### Angular CLI commands: