javascript - AngularJs "ng-repeat-start" with table -


i have object in format, trying print table.

[{categoryname: "category1", value:[{name:"item1.1"}{name:"item1.2"},...]},       {categoryname: "category2", value:[{name:"item2.1"},...]},...] 

so, categaory name should header , values under should subheaders, in colspan of categoryname should equal number of values in it.

<table>         <thead>             <tr ng-repeat-start="obj in hobj">                 <th ng-repeat="val in obj.value">{{val}}</th>             </tr>             <tr ng-repeat-end></tr>         </thead> </table> 

the above code print each value of array different "tr". how can achieve it?

edit data: sorry, data flattened think..

[{categoryname: "category1", value:["item1.1","item1.2",...]},  {categoryname: "category2", value:["item2.1",...]},...] 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -