Angular

What it does

Configures a view query.

How to use

.

import {AfterViewInit, Component, Directive, ViewChild} from '@angular/core'; @Directive({selector: 'child-directive'}) class ChildDirective { } @Component({selector: 'someCmp', templateUrl: 'someCmp.html'}) class SomeCmp implements AfterViewInit { @ViewChild(ChildDirective) child: ChildDirective; ngAfterViewInit() { // child is set } }

Description

exported from @angular/core/index defined in @angular/core/src/metadata/di.ts