ViewChildren: ViewChildrenFactory

export ViewChildren : ViewChildrenFactory

exported from angular2/core defined in angular2/src/core/metadata.ts (line 1122)

Configures a view query.

View queries are set before the ngAfterViewInit callback is called.

Example

@Component({
  selector: 'someDir',
  templateUrl: 'someTemplate',
  directives: [ItemDirective]
})
class SomeDir {
  @ViewChildren(ItemDirective) viewChildren: QueryList<ItemDirective>;

  ngAfterViewInit() {
    // viewChildren is set
  }
}