- Notifications
You must be signed in to change notification settings - Fork 8
Angular Lifecycle Hook
Md. Shohel Rana edited this page May 6, 2018 · 3 revisions
Every framework has a lifecycle, Here is the lifecycle managed by Angular. Angular creates it, renders it, creates and renders its children, checks it when its data-bound properties change, and destroys it before removing it from the DOM.
constructor(myService: MyService, ...) { ... } ngOnChanges(changeRecord) { ... } ngOnInit() { ... } ngDoCheck() { ... } ngAfterContentInit() { ... } ngAfterContentChecked() { ... } ngAfterViewInit() { ... } ngAfterViewChecked() { ... } ngOnDestroy() { ... }