【发布时间】:2017-07-12 15:18:41
【问题描述】:
我有一个包含这些字段的地方数组。(大陆和国家)
places = [
{ "continent":"Europe", "country": "UK" },
{ "continent":"North America", "country": "US" },
{ "continent":"Asia", "country": "Philippines" },
{ "continent":"Africa", "country": "Egypt" }
];
我想要的是转置数据。我希望数据表显示在数据表中,这样大陆行将成为标题,国家将成为字段。我想要的是这样的东西。
我为此创建了一个 plunkr。 http://plnkr.co/edit/KX1pCw?p=preview
【问题讨论】:
-
@Aravind 你能检查我的 plunkr 吗?我正在尝试这样做,但我不知道如何实现它。
标签: angular typescript primeng