html - ng-repeat on td element -



html - ng-repeat on td element -

i have item collection , want display each item object within in table.

i have image display each item well. so, decided utilize < tbody ng-repeat>, that, each image can occupy 3 rows cell

the issue comes when need display calculations in column, array object reside each item. can see here http://jsbin.com/nifazanehe/3/edit?html,css,js,output background color red.

the first 2 index of calculations object hard coded , rest using ng-repeat. solves problem yet looks buttugly! hate it!

any suggestion?

other solutions can think of :

to nest table can ng-repeat individual row or maybe simple < ul>< li ng-repeat> after empty out section of rows , columns using rowspan , colspan

you can work np-repeat-start , ng-repeat-end directive

<table> <tbody> <tr ng-repeat-start="demo in vm.demoarray"> <td >{{demo.attr1}}</td> <td>{{demo.attr2}}</td> </tr> <tr ng-repeat-end> <td>{{demo.attr1}}</td> <td>{{demo.attr2}}</td> </tr> </tbody> </table>

html angularjs angularjs-ng-repeat

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -