ContentChildren
ContentChildren decorator
What it does
Configures a content query.
How to use
.
import {AfterContentInit, ContentChildren, Directive, QueryList} from '@angular/core'; @Directive({selector: 'child-directive'}) class ChildDirective { } @Directive({selector: 'someDir'}) class SomeDir implements AfterContentInit { @ContentChildren(ChildDirective) contentChildren: QueryList<ChildDirective>; ngAfterContentInit() { // contentChildren is set } }
Description
You can use ContentChildren to get the 登录查看完整内容