Angular 1 and Angular 2 Integration

Angular 2 Components Life cycle

In Angular 2 components life-cycle, there are several events occur to complete this life-cycle.
Components Life-cycle events

Events
Description
ngOnChanges
Before Ng on init event, the data-bound input property value changes.
ngOnInit
After the first ngOnChanges event, the ngOnInit event fire.
ngDoCheck
During every Angular change detection cycle ngDoCheck event fire.
ngAfterContentInit
After projecting content into the component ngAfterContentInit event fire.
ngAfterContentChecked
After every check of projected component content the ngAfterContentChecked event fire.


ngAfterViewInit           
After initializing the component's views and child views the ngAfterViewInit event fire.
ngAfterViewChecked
After every check of the component's views and child views the ngAfterViewChecked event fire.
ngOnDestroy
Just before Angular destroys the directive or component the ngOnDestroy event fire.



For more detail, you can go below links



ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..
My Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

www.code-sample.com/. Powered by Blogger.