Tag: Lifecycle

Angular 4

Angular 4 Tutorial : Component Lifecycle

Component lifecycle

Hello everyone, in the last post, http://www.mytechthinking.in/2017/10/12/angular-4-tutorial-view-encapsulation-and-local-references/ , we learned about the view encapsulation and various ways to pass contents to DOM. In this post, we will learn about the lifecycle of the components. Let’s discuss them one by one. ngOnInit : This is called on the initialization of the component. ngOnChanges¬†: This is called …