<!-- Position Column -->
<ng-container matColumnDef="position">
<th mat-header-cell *matHeaderCellDef> No. </th>
<td mat-cell *matCellDef="let element"> <app-my-component [position]="element.position" ></app-my-component> </td>
</ng-container>
你好,我想访问matRow
https://stackblitz.com/edit/angular-mmuf6a
我已经使用主机directive
侦听器创建了一个行on click
,并尝试使用component
函数在我的行中获取ng.probe
有更好的方法吗?
另一种可能的解决方案是使用@ViewChildren()装饰器获取放置在表组件内部的所有自定义组件的列表。