角度のある材質のテーブルコードです。角度材質テーブルで未定義の 'template'プロパティを読み取ることができません
<div class="example-container mat-elevation-z8">
<div>
<div class="example-header">
<mat-form-field floatPlaceholder="never">
<input matInput #filter placeholder="Filter users">
</mat-form-field>
<button mat-icon-button color="accent" (click)="create()">
<mat-icon aria-label="Example icon-button with a add icon">add_circle</mat-icon>
</button>
</div>
<div>
</div>
</div>
<mat-table >
<ng-container matColumnDef="BloodPressure">
<mat-header-cell> BloodPressure </mat-header-cell>
<mat-cell *ngFor="let visit"> {{ visit?.bloodpressure }} </mat-cell>
</ng-container>
<ng-container matColumnDef="UserName">
<mat-header-cell> UserName </mat-header-cell>
<mat-cell *ngFor="let visit"> {{ visit?.username }} </mat-cell>
</ng-container>
<ng-container matColumnDef="Height">
<mat-header-cell > Height </mat-header-cell>
<mat-cell *ngFor="let visit"> {{ visit?.height }} </mat-cell>
</ng-container>
<ng-container matColumnDef="Weight">
<mat-header-cell > Weight </mat-header-cell>
<mat-cell *ngFor="let visit"> {{ visit?.weight }} </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
また、MatTableDataSourceをインポートできません。エラーを表示
は
は、それが将来的にので、あなたのcomponent.tsファイルを見ることなく知ることは難しい、事前
@ angle/core、@ angular/material、@ angular/cdkのバージョンは何ですか? –
@ angular/material – Narendar
@Narendarテンプレートのコードを追加 – Aravind