javascript - How to use ng-repeat to define a table's td colspan? (AngularJS) -



javascript - How to use ng-repeat to define a table's td colspan? (AngularJS) -

given next code, how define colspan of first td match number of other "td"s in table can take total width of table?

<table ng-repeat="product in products"> <tr> <td colspan=""> {{product.name}} </td> </tr> <tr ng-repeat="item in product.items"> <td ng-repeat="element in item"> {{element}} </td> </tr> </table>

live code here: http://jsfiddle.net/z37uofqk/

i think you're trying column span whole table. way that:

<td colspan="100%"> {{product.name}} </td>

javascript angularjs angularjs-directive angularjs-scope angularjs-ng-repeat

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -