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

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
http://www.code-sample.com
http://www.code-sample.xyz

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.