Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 将列表从HTML发送到TypeScript_Angular_Typescript_Angular Material - Fatal编程技术网

Angular 将列表从HTML发送到TypeScript

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

我的HTML中确实有一行作为其他
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中,脚本不被视为数据源。根本看不见。这就是我想要的