我正在尝试在react中将不同的db表呈现为html表。这里的问题是每个表中的列数不同。在我的组件中,我正在接收JSON格式的头部数据和完整的表数据。 例如。 For table #1:
header data : ["A","B","c"]
table data : [{"A":1,"B":2,"c":3},{"A":4,"B":5,"c":6}]
For table #2:
header data : ["A","B&
我有一个由firestore firesotre连接好的json数组。 我的代码 let query_chart =db.collection('collection').doc('date')
let chart_data_json =[];
query_chart.get().then(doc=>{
if (!doc.exists) {
console.log('No such document!');
} else {
console.log('Doc
希望你们能帮我。我们的计划是用.json循环显示保存在ngFor文件中的数据。
到目前为止,在我的代码中,我总是遇到以下错误:
Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
我研究并知道我必须用管道来修理它。但我不知道它是如何工作的,因为我对角度很陌生。
这就是我加载JSON并将其标记到temp变量的方式:
ngOnInit(): v