【发布时间】:2018-10-15 11:42:04
【问题描述】:
我在 firebase 中有这些数据我想使用 Angular 4 在 html 中显示,当我尝试向其中添加 json ({{ order.items | json }}) 时,它会显示整个结果,但不会在表格中格式化像结构一样便于阅读。谁能帮忙。
【问题讨论】:
标签: angular firebase firebase-realtime-database
我在 firebase 中有这些数据我想使用 Angular 4 在 html 中显示,当我尝试向其中添加 json ({{ order.items | json }}) 时,它会显示整个结果,但不会在表格中格式化像结构一样便于阅读。谁能帮忙。
【问题讨论】:
标签: angular firebase firebase-realtime-database
您可以使用prismjs 来美化输出。
类似这样的:
<pre [innerHtml]="sortedObject | prettyjson:2" #prettyObjectElement></pre>
您可以了解更多here
【讨论】: