使用 ng-repeat 的 tr 之后的 md-divider

md-divider after a tr using ng-repeat

我想在我的 table 行的每一行下添加 md-divider 下划线。特别是因为 md-divider 有很好的 ng=if"!$last"。但似乎 ng-repeat 必须在 tr 元素上进行,因此分隔符不能在 table 行之后。

<tr ng-repeat="user in users" class="row">
    <td>{{user.firstName}}</td>
    <td>{{user.lastName}}</td>
</tr>
- I would want a divider here.

注意:我也试过只使用边框,但它甚至没有出现。

你可以用 css 实现它,方法是给 <td> 而不是 <tr>

边框
td{
  border-bottom:1px solid #000; // change color and size accordingly
}

css border doesn't works in <tr> but you can apply it on <td> because both <td> in <tr> will have the same height so it will not create any problem.