I wanted to have a table like this using angular repeat
HTML
<table border="1"> <tr> <th>Month</th> <th>Savings</th> <th>Savings for holiday!</th> </tr> <tr> <td>January</td> <td>$100</td> <td rowspan="2">$50</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> <tr> <td>January</td> <td>$100</td> <td rowspan="2">$50</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </table>
I wrote Angularjs code for the above.
<table border="1"> <tr> <th>Month</th> <th>Savings</th> <th>Savings for holiday!</th> </tr> <tr ng-repeat="row in rows"> <td>{{row.month}}</td> <td>{{row.savings}}</td> <td rowspan="2">{{row.holidaysavings}}</td> </tr> </table>
td with rowspan is repeated using ng-repeat, which is not required. How can i avoid this?
source share