Issue
I have data like this :
people = [{
name: 'mary',
item: [{tk:1},{fk:2},{ik:3}]
}, {
name: 'sano',
item: [{tk:4},{fk:5},{ik:6}]
}]
And I would like to generate a table like this :
mary sano
tk 1 4
fk 2 5
ik 3 6
I am really beginner and I do know how should I generate the table with header.
Solution
I will explain the tools you need. Rather than using a magic library, you should do this manually to learn.
Use ng-repeat to loop through the people elements, and display the "name" values. You can output the values using the {{ }} syntax
<table>
<tbody ng-repeat="person in people">
<th>
{{person.name}}
</th>
</tbody>
.. rest of code here
</table>
You can use this pattern to render the rest of the data values.
Answered By - ergonaut
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.