Skip to content

Instantly share code, notes, and snippets.

@nonodev96
Created January 21, 2022 17:21
Show Gist options
  • Save nonodev96/b66ca3b50b4abc878ff6bb6e9862cd82 to your computer and use it in GitHub Desktop.
Save nonodev96/b66ca3b50b4abc878ff6bb6e9862cd82 to your computer and use it in GitHub Desktop.
Lifecycle Hooks - Angular
import {
AfterContentChecked,
AfterContentInit,
AfterViewChecked,
AfterViewInit,
Component,
DoCheck,
OnChanges,
OnDestroy,
OnInit
} from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html'
})
export class HomeComponent
implements
OnChanges,
OnInit,
DoCheck,
AfterContentInit,
AfterContentChecked,
AfterViewInit,
AfterViewChecked,
OnDestroy {
ngOnChanges() {}
ngOnInit() {}
ngDoCheck() {}
ngAfterContentInit() {}
ngAfterContentChecked() {}
ngAfterViewInit() {}
ngAfterViewChecked() {}
ngOnDestroy() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment