我在扩展标题下设计了动态复选框列表,因为它是动态的,所以如何动态获取所有复选框值并将其发送到 API?
PS 如何从API循环显示这样的动态列表?我对 Angular 和 Tyepscript 很陌生,所以我需要一些帮助。
下面是API的响应,我如何根据categoryID对它们进行分组?
{
"code": "200",
"message": "Success",
"data": [
{
"categoryId": "ADMDSHB",
"accessId": "ADPRATE",
"catAccessStatus": "A",
"createdBy": null,
"updatedBy": null,
"createdAt": "2020-04-09T09:22:16.000Z",
"updatedAt": "2020-04-09T09:22:16.000Z",
"BoRefCategory": {
"categoryId": "ADMDSHB",
"categoryDesc": "Dashboard-admin"
},
"BoRefAccess": {
"accessId": "ADPRATE",
"accessDesc": "Adoption Rate"
}
},
{
"categoryId": "ADMDSHB",
"accessId": "AGTMLR",
"catAccessStatus": "A",
"createdBy": null,
"updatedBy": null,
"createdAt": "2020-04-09T09:22:33.000Z",
"updatedAt": "2020-04-09T09:22:33.000Z",
"BoRefCategory": {
"categoryId": "ADMDSHB",
"categoryDesc": "Dashboard-admin"
},
"BoRefAccess": {
"accessId": "AGTMLR",
"accessDesc": "Agent MLR"
}
},
{
"categoryId": "ADMDSHB",
"accessId": "AGTMLR",
"catAccessStatus": "A",
"createdBy": null,
"updatedBy": null,
"createdAt": "2020-04-09T12:07:44.000Z",
"updatedAt": "2020-04-09T12:07:44.000Z",
"BoRefCategory": {
"categoryId": "ADMDSHB",
"categoryDesc": "Dashboard-admin"
},
"BoRefAccess": {
"accessId": "AGTMLR",
"accessDesc": "Agent MLR"
}
}
]
}
临摹微笑
相关分类