angular - 我们如何使用 Angular Material 显示侧边导航栏菜单?
问题描述
我想使用 JSON 响应(可以是动态的)显示一个侧导航栏,如下所示:
[{
"A": "A-Value",
"B": [{
"C": [{
"D": [{
"E": "E-Value",
"F": "F-Value",
"G": "G-Value",
"H": "H-Value"
}],
"I": "I-Value",
"J": "J-Value",
"K": "K-Value",
"L": "L-Value"
}, {
"D": [{
"E": "E1-Value",
"F": "F1-Value",
"G": "G1-Value",
"H": "H1-Value"
}],
"I": "I1-Value",
"J": "J1-Value",
"K": "K1-Value",
"L": "L1-Value"
}],
"L": "L2-Value"
}, {
"L": "L3-Value"
}, {
"L": "L4-Value"
}, {
"L": "L5-Value"
}, {
"c": [{
"D": [{
"E": "E2-Value",
"F": "F2-Value",
"G": "G2-Value",
"H": "H2-Value"
}],
"I": "I7-Value",
"J": "J7-Value",
"K": "K7-Value",
"L": "L7-Value"
}],
"L": "L6-Value"
}]
}]
并且上述响应应显示在图片中,如下所示: 在此处输入图像描述
我尝试使用 ng-material-multilevel-menu 但它不起作用,因为它的 JSON 结构格式是固定的?
解决方案
推荐阅读
- html - 在创建年龄工具时遇到问题,您可以使用向上和箭头工具更改值
- sql - 显示 0 而不是不显示的查询
- java - 重新导入多个 pom.xml 文件
- gatling - Gatling 使变量或属性在 transformResponse 块之外可用
- python - 计算列表中包含的 0 多于 1 的元素的数量
- java - 如何在 IntelliJ IDEA 中查看本地运行的 AppEngine 应用程序的调试日志?
- loopback - 如何重置未在环回中验证电子邮件的用户的密码?
- python - cv2 warp 透视的奇怪结果
- php - 在两个不同表中的数据库中添加来自 JSON 的数据
- python-3.x - Keras,Tensorflow:将两个不同的模型输出合并为一个