【发布时间】:2017-04-05 15:00:11
【问题描述】:
我是新手 (2.0.3)。我有一个 Angular 2 程序,它有一个公共的产品数组。
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