Angular 将列表从HTML发送到TypeScript
我的HTML中确实有一行作为其他Angular 将列表从HTML发送到TypeScript,angular,typescript,angular-material,Angular,Typescript,Angular Material,我的HTML中确实有一行作为其他mat表中的一行: <mat-table [dataSource]="items"> <mat-table [dataSource]="row.rowItems"> </mat-table> </mat-table> row.rowItemsdataSource未绑定到TypeScript中的列表,因为它是从HTML派生的 如何访问TypeScript中的[dataSource]=“row.ro
mat表中的一行
:
<mat-table [dataSource]="items">
<mat-table [dataSource]="row.rowItems"> </mat-table>
</mat-table>
row.rowItems
dataSource
未绑定到TypeScript中的列表,因为它是从HTML派生的
如何访问TypeScript中的
[dataSource]=“row.rowItems”
,您可以访问.TS文件中的特定行,如下所示
如果要选择第三行,可以执行以下操作
this.dataSource.data[2];
在TypeScript中,脚本不被视为数据源。根本看不见。这就是我想要的