I'm trying to create an HTML table with dynamic tr and td. I added a nested loop in the HTML and the dynamic column headers (th) are working fine but the values are not being added to the correct td.
这是我拥有的数据:
"finalResult": [ { "tableNamee": "Table_1", "colCategories": [ { "columnnnn": "User", "values": [ { "value": "0" }, { "value": "10" }, { "value": "60" }, { "value": "0" }, { "value": "0" }, { "value": "0" }, { "value": "0" }, { "value": "0" }, { "value": "0" } ] }, { "columnnnn": "Header1", "values": [ { "value": "460" } ] }, { "columnnnn": "Amount", "values": [ { "value": "10" }, { "value": "100" }, { "value": "50" } ] } ] }, { "tableNamee": "Table_2", "colCategories": [ { "columnnnn": "User", "values": [ { "value": "07" }, { "value": "10" } ] }, { "columnnnn": "Amount", "values": [ { "value": "70" } ] }, { "columnnnn": "User1", "values": [ { "value": "57" } ] }, { "columnnnn": "Column", "values": [ { "value": "80" } ] }, { "columnnnn": "Column2", "values": [ { "value": "10" } ] } ] } ]
以下是HTML代码:
Table Name : {{j.tableNamee}}
{{k.columnnnn}} {{m.value}}
这里没有特定的ts代码。我只是按照上述格式操作数据,并尝试在HTML中应用循环。我做错了什么吗?
这是期望的输出: 期望的输出
这是我得到的当前输出: 当前输出
任何帮助将不胜感激!
Your HTML markup looks weird because yourcontains athat wraps. I think this is what is causing your problem.
I haven't tried it, but you could try changing yourtag to the following:
{{k.columnnnn}} {{m.value}}
Like+0
Add Reply
P粉949267121
Popular Topics
More>
What size is a5 paper
Registration domain name query tool
The difference between nohup and &
Introduction to the meaning of += in C language
Popular Articles
-
Bitcoin (BTC) Briefly Rose Above $60K But Gave Up Gains to Trade Around the $60K Mark, Mimicking Moves in Equities Markets
-
Michael Saylor Defends Bitcoin's Volatility, Terms It the 'Price You Pay' for Liquidity and Credit
-
Crafting a Reusable Model Search in Laravel: Efficient Setup and Best Practices
-
Apple's new patent exposed! AI helps record a new chapter in life?
-
How much cooldown can the Boots of Calm reduce?
Popular Tutorials
More>
Related Tutorials
Popular Recommendations
Latest courses
The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)
1394840
PHP introductory tutorial one: Learn PHP in one week
4206554
JAVA Beginner's Video Tutorial
2350536
The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)
1394840
JAVA Beginner's Video Tutorial
2350536
Little Turtle's zero-based introduction to learning Python video tutorial
493287
Quick introduction to web front-end development
213411
Master PS video tutorials from scratch
842690
[Web front-end] Node.js quick start
3140
Complete collection of foreign web development full-stack courses
2533
Go language practical GraphQL
1977
550W fan master learns JavaScript from scratch step by step
465
Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours
10808
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
-
[form button] jQuery enterprise message form contact code
-
[Player special effects] HTML5 MP3 music box playback effects
-
[Menu navigation] HTML5 cool particle animation navigation menu special effects
-
[form button] jQuery visual form drag and drop editing code
-
[Player special effects] VUE.JS imitation Kugou music player code
-
[html5 special effects] Classic html5 pushing box game
-
[Picture special effects] jQuery scrolling to add or reduce image effects
-
[Photo album effects] CSS3 personal album cover hover zoom effect
-
About us
Disclaimer
Sitemap
-
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!