0
我是新的啓動(2.0.3)。我有一個Angular 2程序,有一個公開的產品陣列。無法綁定primeng數據表
private initProductListloaded(res: product[])
{
// Public array of productList
this.productList = res;
}
下面是HTML代碼
<div *ngIf="showProductGrid" style="height:400px;">
<p-dataTable [value]="productList" [rows]="10">
<p-column field="Sku" header="Year"></p-column>
<p-column field="Description" header="Brand"></p-column>
</p-dataTable>
</div>
<select name="wwindustry" style="width:100%"
[(ngModel)]="wselectedIndustry">
<option *ngFor="let c of productList"
[value]="c.Sku"> c.Description}}</option>
</select>
下拉wwindustry是僅用於測試目的,以查看是否productList的陣列從HTML內部具有的任何數據。我試過的所有東西都無法生成數據表
從啓動引入已包括在內。我嘗試從primeng執行數據表的樣本,並得到了相同的結果。 –
我懷疑我的HTML是錯的?這是我正在使用的HTML。 –
相關問題