从父级访问子组件参数

Access Sub Component Parameters from Parent

我有以下代码

<div  class="data-container" #dataContainer>
<result (click)="onContainerClick($event, i)" *ngFor="let result of resultItems; let  i = index" [result]="result" [index]="i"></result>

每个结果都有一个参数 关闭:布尔值;

如何在 TS 代码中从父级访问?

谢谢,

.
.
.
import { ViewChildren, QueryList, AfterViewInit } from @angular/core
.
.
.
export class ParentComponent implements AfterViewInit {
    @ViewChildren(ResultComponent) resultComps: QueryList<ResultComponent>;

    ngAfterViewInit() {
        this.resultComponents.forEach((comp: ResultComponent) => console.log(comp.closed));
    }
}