使用ng2智能表和json数据生成表

时间:2018-07-11 19:50:33

标签: angular typescript ng2-smart-table

我有以下数据集,我想使用ng2智能表创建以下表。

[
    {
      "clusterID":"1",
      "storeCode": "STC01",
      "storeName": "store 1",
      "departments" : [
          {
            "name":"Vegetables",
            "isDisplay":"true",
            "details":
            {
                "LWSales":"2725",
                "SOH":"250",
                "WksSply":"0.56%"
            }
        },
        {
            "name":"Fruit",
            "isDisplay":"true",
            "details":
            {
                "LWSales":"4752",
                "SOH":"250",
                "WksSply":"0.25%"
            }
        },
        {
            "name":"Chilled",
            "isDisplay":"true",
            "details":
            {
                "LWSales":"5000",
                "SOH":"500",
                "WksSply":"2.36%"
            }
        }   
        ]
    }   
]

enter image description here

我尝试了多种方法来创建表设置,即使使用内置功能也是如此。但无法创建设置。

如何使用给定的json创建适合于上表的设置?

0 个答案:

没有答案