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

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -