Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export class LifecycleHooksComponent implements OnInit {
constructor() { }
ngOnInit() {
console.log('ngOnInit');
}
ngOnChanges(){
console.log('ngOnChanges');
}
ngDoCheck(){
console.log('ngDoCheck');
}
ngAfterContentInit(){
console.log('ngAfterContentInit');
}
ngAfterContentChecked(){
console.log('ngAfterContentChecked')
}
ngAfterViewInit(){
console.log('ngAfterViewInit');
}
ngAfterViewChecked(){
console.log('ngAfterViewChecked');
}
ngOnDestroy(){
console.log('ngOnDestory');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.