Angular

What it does

Configures a content query.

How to use

.

  1. import {AfterContentInit, ContentChild, Directive} from '@angular/core';
  2. @Directive({selector: 'child-directive'})
  3. class ChildDirective {
  4. }
  5. @Directive({selector: 'someDir'})
  6. class SomeDir implements AfterContentInit {
  7. @ContentChild(ChildDirective) contentChild: ChildDirective;
  8. ngAfterContentInit() {
  9. // contentChild is set
  10. }
  11. }

Description

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