1

我可以使用中继器来控制 angularjs 中表格列的宽度吗? col ng-重复

 <colgroup>
                            <col ng-repeat="th in eventCollection.head" ng-style="width:{{th.width}}" />
                            <!--<col span="1" style="width: 5px;">
                            <col span="1" style="width: 100px;">
                            <col span="1" style="width: 20px;">
                            <col span="1" style="width: 20px;">
                            <col span="1" style="width: 20px;">
                            <col span="1" style="width: 20px;">-->
                        </colgroup>
4

1 回答 1

2

只是丢掉双括号:

<col ng-repeat="th in eventCollection.head" span="1" ng-style="{ width: th.width }">
于 2013-01-29T19:26:25.780 回答