This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

AfterViewInit

npm Package @angular/core
Module import { AfterViewInit } from '@angular/core';
Source core/src/metadata/lifecycle_hooks.ts

Lifecycle hook that is called after a component's view has been fully initialized.

Interface Overview

      
      interface AfterViewInit { 
  ngAfterViewInit(): void
}
    

How To Use

      
      @Component({selector: 'my-cmp', template: `...`})
class MyComponent implements AfterViewInit {
  ngAfterViewInit() {
    // ...
  }
}
    

Description

See "Lifecycle Hooks Guide".

Members

      
      ngAfterViewInit(): void