Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between AfterContentChecked and AfterViewChecked in Angular2?

Tags:

angular

I am trying to learn what is the exact difference between these two life cycle hooks? Can anyone please explain me how to use them with any simple example? I just want to when exactly I should implement these interfaces?

Thank you.

Cheers.

like image 320
ShellZero Avatar asked Sep 26 '16 20:09

ShellZero


1 Answers

  • view addresses the template of the component

  • content addresses the transcluded children of the current component (that you can transclude using the <ng-content></ng-content> element).

For full details see https://angular.io/docs/ts/latest/guide/lifecycle-hooks.html#!#afterview

like image 82
Günter Zöchbauer Avatar answered Sep 22 '22 10:09

Günter Zöchbauer