我在表内有下拉菜单,如果该行下面的表中没有空间,则需要将其更改为下拉菜单。我该如何实现?可以帮个忙吗示例代码http://jsfiddle.net/mhu23/YZx7R/22/
<div ng-controller="MyCtrl">
<div class="container">
<div class="row">
<div class="span2">
<table class="table">
<tr ng-repeat="row in [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]">
<td> <a>{{row}}</a>
</td>
<td>
<ul class="nav">
<!-- To create dropups instead of dropdowns i could add the class "dropup" to the li-element below. -->
<!-- But what I need is an inteligent mechanism that decides when to use dropdown and when to use dropup -->
<li class="dropdown pull-right"> <a class="btn-link dropdown-toggle">
<i class="icon-align-justify"></i>
</a>
<ul class="dropdown-menu">
<li ng-repeat="menu in [1,2,3]"> <a class="btn-link">{{menu}}</a>
</li>
</ul>
</li>
</ul>
</td>
</tr>
</table>
</div>
</div>
</div>
使用$last
属性
类似: